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

Which is the best programming language to learn in today's era? Java, C,C++, Python or any else?
Java is the best language because it is platform indepedent and opensource u can download java software at anywhere
Swati
0 0
5
Does Java support pointers?
Yes and no. . The pointer model is of course supported by Java. But it has become much easier to the developer to handle it. Because Java exposes the concept of pointer in terms of reference variables...
Santosh
0 0
7
Is it really needed to do Java training before graduation, to get a job?
Yes, It's must to get better opportunities and to standard alone in IT field. Not only core Java but also learn Spring,Hinernat ,Struts. ANGULARJS add an advantage to get job easily.
Udaybhan
how to run a java program
go to command prompt then write the following-- For compilation: javac filename.java then press enter For run: java classname then press enter
Prem Kumar Pathak

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

Ask a Question

Related Lessons

What Is Java? Explain The History Of Java
i. Ovierview: Java programming language was originally developed by Sun Microsystems which was initiated by James Gosling and released in 1995 as core component of Sun Microsystems' Java platform (Java...

Why we need to learn Programming languages?
Language is medium for communication. If two parties like to communicate or exchange the thoughts they must know a language. Language should be understandable by both the Parties. For example A wants to...

Java Collection
Collection: The collection provides an architecture like a list where we can store and manipulate the group of items. Through Collections, we can achieve operations such as searching, sorting, insertion,...

JAVA OOPs Concepts (Object-Oriented Programming System)
JAVA OOPs Concepts (Object-Oriented Programming System) It is primarily having below crucial points. Without below essential points, we will never be able to achieve OOPs in java, PHP, C#, etc. Now let...

How to create a Singleton class?
How to create a Singleton class: Q) What is a singleton class? A) In simple words, a singleton class is a class which can have only one instance at any point of time throughout the application and provides...

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