UrbanPro

Learn Java Training from the Best Tutors

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

Search in

Why we are using this keyword in Java?

Asked by Last Modified  

9 Answers

Learn Java

Follow 7
Answer

Please enter your answer

Master of Business Administration (Information System) (Sikkim Manipal University |Apr 2010) Bachelor of Science (Information Technology) (Sikkim Manipal University |Aug 2006)

"this" keyword is use to refer an object of current class it is also use for call specific constructor of current class if more than one constructor is declared.
Comments

Trainer

to access current object
Comments

this keyword in Java is used to refer to the current object.
Comments

Full Stack Apps Engineer (Java)

this is a reference to the current object. Object can contain member variables and those can be accessed from functions using this variable. If a function has parameters name & age and the instance has the same variables then the instance variables will be assigned values using this keyword. The code...
read more
this is a reference to the current object. Object can contain member variables and those can be accessed from functions using this variable. If a function has parameters name & age and the instance has the same variables then the instance variables will be assigned values using this keyword. The code snippet is below. private void private void assignStudentDetails(String name, int age) { this.name = name; // If no this is specified then there will be unexpected error in run time this.age = age; } More details can be found from https://docs.oracle.com/javase/tutorial/java/javaOO/thiskey.html. read less
Comments

THIS is a reference variable in Java that refers to the current object. ... It can be used to refer instance variable of current class. It can be used to invoke or initiate current class constructor. It can be passed as an argument in the method call.
read more

THIS is a reference variable in Java that refers to the current object. ... It can be used to refer instance variable of current class. It can be used to invoke or initiate current class constructor. It can be passed as an argument in the method call.

read less
Comments

Web Engineer

this can be used to refer current class instance variable. this can be used to invoke current class method (implicitly) this() can be used to invoke current class constructor. this can be passed as an argument in the method call. this can be passed as argument in the constructor call. this can be used...
read more
this can be used to refer current class instance variable. this can be used to invoke current class method (implicitly) this() can be used to invoke current class constructor. this can be passed as an argument in the method call. this can be passed as argument in the constructor call. this can be used to return the current class instance from the method. read less
Comments

this is a keyword in Java. It can be used inside the Method or constructor of Class. It(this) works as a reference to the current Object whose Method or constructor is being invoked.
Comments

20 years of teaching,academics and engineering

This is used to refer current class object. this with parentheses creates current class constructor
Comments

Computer classes For Working professionals and studne of Engineering, MCA, Class 12,11 class 10

this keyword is refrence keyword that refers to the current obect.
Comments

View 7 more Answers

Related Questions

How to prepare for CORE JAVA for Android Developement?

Core Java is required for basic understanding of inheritance , AWT with button action programs, library usage etc then after u can genrate your logic with additional topics of Android
Rishabh
0 0
6
What is the general syllabus covered in core Java training from any institution?
you can check the syallbus on http://felix-its.com/java-training-pune/
Shiv Kohli
0 0
5
Is java a frontend or a middleware technology or both?
It's a programming language which is used to write application programs and is independent of platform.
Neha
0 0
5
What is Service Locator in java?
The Service Locator abstracts the API lookup (naming) services, vendor dependencies, lookup complexities, and business object creation. Provides a simple interface to clients. This reduces the client's...
Arunava Chatterjee
What should I do after learning Java core?
After learning Java SE you should focus on building something to make your concepts clear. You can also learn Java related frameworks like Spring to build web applications.
Kumarnaik
0 0
5

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

Ask a Question

Related Lessons

Mastering in Java Programming
Core java topics What is Java?Execution Model Of JavaBytecodeHow to Get Java?A First Java ProgramCompiling and Interpreting ApplicationsThe JDK Directory StructureUsing Eclipse Data types and Variables What...

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...

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...

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...

Syntax and example of java
Java syntax: Class Display - - class definition { Void Display() { System.out.println('welcome to Java') ; } Public static void main(String arcs) { Display D=new Display() ;--object creation D. Display } }

Recommended Articles

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 >

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 >

In the domain of Information Technology, there is always a lot to learn and implement. However, some technologies have a relatively higher demand than the rest of the others. So here are some popular IT courses for the present and upcoming future: Cloud Computing Cloud Computing is a computing technique which is used...

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 >

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