UrbanPro

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

What is 'this' in Java?

Asked by Last Modified  

80 Answers

Learn Java

Follow 0
Answer

Please enter your answer

Azure IoT, Agile Coach , JIRA, QA, PowerBI , Business Analyst, Software Testing, Dremio trainer

this is a keyword in Java. Works as a reference to current object whose constructor is being invoked
Comments

Software Developer, Expertise in Java/J2ee Technology.

this is a keyword in java, which represent current object ie it contains the reference (address) of current object.
Comments

mca

In java 'this' used as the reference object that refers the current object means the instance of current object of the class. Using 'this' you can access the current class constructor, methods, members, etc
Comments

Java,J2EE,Spring,Webservices,Hibernate,Cloud And Android Expertise

This is java keyword and used to represent the current object's reference
Comments

This a very special keyword in Java and can be used to represent current instance of an object and also to call overloaded constructor.
Comments

Industry expert and professional lecturer/trainer

This is a keyword to make JVM understand that the method or variable we are accessing is of the object on which we calling the method
Comments

Best Tutor@Marathahalli Bngalore

to refer to the current object.
Comments

Sorry... class Student{ private int rollNo; public void setRollNo(int roll){ this.rollNo = roll; // which objects calls setRollNo(), this keyword is represented by object } } Student obj = new Student(); obj.setRollNo(10); //here obj is this pointer in setRollNo() -
Comments

IT Professional Trainer with 15 years of experience in IT Industry

Objects are defined by classes and have methods and variables The use of this on an instance variable in a method indicates that, the instance variable belongs to the implicit parameter, or that it is an instance variable of the implicit parameter. The implicit parameter is the object the method is...
read more
Objects are defined by classes and have methods and variables The use of this on an instance variable in a method indicates that, the instance variable belongs to the implicit parameter, or that it is an instance variable of the implicit parameter. The implicit parameter is the object the method is called from in this case "audi". The java compiler automatically adds the this reserved word, adding it is a matter of preference this cannot be used without a dot(.) this is syntactically invalid this can also be used to distinguish between local variables and global variables that have the same name the this reserve word also applies to methods, to indicate a method belongs to a particular object. read less
Comments

5+ years of experience in computer science with c++ for class 11th and 12th , java, spring mvc, angular.js for MCA, BCA, 12th, B.tech. Working as Team leader in IT company

This is a self referencing keyword.. which is represented by class to reference it self.. e.g. you have a class data member with name "abc" and you have a class method and it has a parameter with same name "abc".. now how you can distinguish b/w both "abc".. cool that is just by adding this.abc forclass...
read more
This is a self referencing keyword.. which is represented by class to reference it self.. e.g. you have a class data member with name "abc" and you have a class method and it has a parameter with same name "abc".. now how you can distinguish b/w both "abc".. cool that is just by adding this.abc forclass "abc" to distinguisg from method parameter "abc" read less
Comments

View 78 more Answers

Related Questions

what is serialVersionUID , why it different for each bean? serialVersionUID = 42L;
The serialization runtime associates with each serializable class a version number, called a serialVersionUID, which is used during deserialization to verify that the sender and receiver of a serialized...
Srilatha N
What is the difference between checked and unchecked exceptions?
The main difference between checked and unchecked exception is that the checked exceptions are checked at compile-time while unchecked exceptions are checked at runtime
Wren
best source to learn java from?
Main source if information on Java is oracle documentation. But it takes your time to read through, a lot more than you expect. Better prefer a trainer who can give what you need.
Himanshu
Where advanced java can be utilized?
Advanced Java is an extension of Java used for developing and running enterprise software and large-scale multi-tiered, scalable, reliable and secure network applications.
Nish

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons


Constructor in Java
A constructor is a particular type of method that is used to initialise the object. The constructor is invoked at the time of object creation. It constructs the values, i.e. provides data for the object...

How can everyone prepare to clear any Java interview?
Java interview your java should be much strong then J2EE. core java and Advance java is the basic foundation for Interview. Some of the topic about which you should know before going for a java interview...

Java Advantages
In this video, learn about Java and its advantages. Also, check out the difference between Java and C++, Java development kit, Java Run Time Environment (JRE) with a proper demonstration program for better clarity.

Interview Tip : Q1) Why Strings are immutable in java ? What happen if it was mutable in java?
As we all know that Strings in java are immutabe in nature, now the question comes why the creator made it immutable in nature, although this field used maximum in any java program. The answer to this...

Recommended Articles

Before we start on the importance of learning JavaScript, let’s start with a short introduction on the topic. JavaScript is the most popular programming language in the world, precisely it is the language - for Computers, the Web, Servers, Smart Phone, Laptops, Mobiles, Tablets and more. And if you are a beginner or planning...

Read full article >

Java is the most commonly used popular programming language for the creation of web applications and platform today. Integrated Cloud Applications and Platform Services Oracle says, “Java developers worldwide has over 9 million and runs approximately 3 billion mobile phones”.  Right from its first implication as java 1.0...

Read full article >

Designed in a flexible and user-friendly demeanor, Java is the most commonly used programming language for the creation of web applications and platform. It allows developers to “write once, run anywhere” (WORA). It is general-purpose, a high-level programming language developed by Sun Microsystem. Initially known as an...

Read full article >

Java is the most famous programming language till date. 20 years is a big time for any programming language to survive and gain strength. Java has been proved to be one of the most reliable programming languages for networked computers. source:techcentral.com Java was developed to pertain over the Internet. Over...

Read full article >

Looking for Java Training Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more