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

Is it possible to learn java at home without coaching in one month?
It all depends on you. If you are already aware of programming then it is definetly possible to learn java at home. But if learn through a tutor then you can learn easily.
Pritom
0 0
5
What exactly the work of constructor( default, parameterized) especially about instance variables initialization. Suppose user initialize the instance variables explicitly. Then what is the use of parameterized constructor over here.. Please reply me
Construct as the name suggest are used to construct the object. So, they are invoked only once and that too at the time of object creation. Default Constructor : Initialize all the instance variables...
Surekha
Why do many software engineers not like Java?
Opinions on programming languages can vary, but some software engineers may express dissatisfaction with Java for reasons such as perceived verbosity, boilerplate code, and a slower pace of language evolution...
Guruprasad
0 0
5
What are the requirements of learning Java? How long it takes to learn java and what is the fee structure?
Core java is main to learn, if you join my classes it takes one month to become master.
Ruuchi

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

Ask a Question

Related Lessons

Understanding concept of Inheritance in Java
Inheritance: Acquiring a properties and methods from Parent class to Child class. For example, In some cases we can hear from any one of your relative or your friends will say like that "You are bahaving...

On the Job training is always best
On the job training always provides an opportunity to learn the best industry practices. While you work on real time you would encounter many challenges that will force you to learn many new things. Class...
M

JAVA - Object Cloning
JAVA - Object Cloning Is the way of creating the same copy of object without calling the class constructor. It means we can make any class object multiple times without calling its default constructor....

Programing Languages Learning Tricks
You want to learn that new language or library or framework as soon as possible, right? That’s understandable. Fortunately, there are a handful of tips that can help you to better retain all of that...

Harshal G.

0 0
0

Lambda Expressions in Java
A lambda expression, introduced in Java 8 is similar to a block of code resembling an anonymous function that can be passed to constructors or methods for execution as an argument. Examples: a)() ->...

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