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

Sir how is Java a pure object oriented programming language?

 

Java is not a purely object-oriented programming language. Lots of people say’s its object-oriented language but it is not true because Java supports primitive data type and does not handle multiple inheritances.
Ram
What are the best websites to learn java as well as get a certificate from them?
To learn basic java i suggest javatpoint is good for knowledge as well as concept but for certification refer book
Abirami
0 0
7
Can you tell me some new features in JavaFX 2.0?
JavaFX is a software platform for creating and delivering desktop applications, as well as rich internet applications (RIAs) that can run across a wide variety of devices. JavaFX is intended to replace...
Renuka
0 0
5
I am looking for live project trainer for Java j2ee near Hinjewadi ph 3 or near Bavdhan. Thanks
I am a passoniate software enginner and a professional trainer. I can provide support for your live project.
Richa
Anybody knows converting jsf primeface into css bootstrap?
We can use some bootstrap CSS classes and helpers but if we want give style to each UI control, we will need to set the primefaces theme to none. context-param param-name primefaces.THEME /param-name...
Pradeep
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

Class and Objects in Java
Class is a template or a blueprint which is used to describe an object. On other hand Object is a reference of a class which follows all the stuff written inside the class. How about taking the whole tour in the following video

Facebook Analytics
Assume how the Facebook application will store the millions of customer's record in real-time: facebook = { 'jose': { 'name': 'jose', 'age': 33, 'hobby': , # cricket,football 'mobile': 1111111111, 'email':...

Tips of learning Java Language/Other Programming Languages
1.You should know the basic concept: If we talk about programming languages so basic concept are same in all the high level languages. So you should know the basic concept firstly then you can easily understand...
I

ICreative Solution

0 0
0

Java : Compile-time Versus Runtime optimization
While designing and development, one should think in terms of compile-time and run-time.It helps in understanding language basics in a better way.Let's understand this with a question below : What...
S

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

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