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 meant by Java full stack and angular Java?

Fullstack development means the combination of UI technologies (client-side) + Backend technology (server-side). UI technology like Angular or ReactJs (Front end technologies). It's all about client-side...
Anuradha
Can u explain init() method is used in servlet for initialization then constructor also there for initializing variables.then what makes the difference between init() and default constructor in servlets?
Using init() only advisable than default constructor because we cannot initialize servlet using constructor because servlets are not directly instantiated by javacode, instead container create instance...
Anwar
Why is finally introduced in Java?
Finally is introduced in Java to do the code clean up or if you wants to perform some operation irrespective of whether the code throws an Exception or not.
Agastya
Which programming language should I learn, C++, Python or Java?
It depend on your interest , meanwhile phython is the new boss. Java is evergreen
Navneet
0 0
5
What is the best site to learn Java for development?
https://beginnersbook.com/java-tutorial-for-beginners-with-examples/ This is the best website for Java beginners.
Chai
0 0
8

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

Ask a Question

Related Lessons

Java Program Sample Application
/* WAP to print given message on the console using java*/ // Class declaration in java class sample { // Main function public static void main(String args) { // function for printing on the console System.out.println("Hello...

Java inheritance example
Answer these questions Answer the above question

Introduction to Course Content
Video about what we are going to learn throughout the Java Training Session .

Overview on Auto IT and use in selenium webdriver
AutoIt v3 is a freeware BASIC-like scripting languages designed for automating the windows GUI and general scripting. It used a combination of simulated keystrokes, mouse movements and window/control manipulation...
S

CoreJAVA
Core Java Training High Level Course Content Trained by Java Architect 1. Core Java Programming Introduction of Java 2. Data types and Operators 3. Control Flow statements 4. OOPS and its application...
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