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

What is the best book to learn data structures using Java?
There are several excellent books that can help you learn data structures using Java. 1. "Data Structures and Algorithms in Java" by Robert Lafore. 2. "Algorithms, Part I" by Robert Sedgewick and Kevin...
Shubham
0 0
5
While teaching IT Student (MCA / BCA / BTech), I found most of the students are not having good programming skills but they are still running behind to learn .NET / PHP / PYTHON / ANDROID / JAVA. Why is it so? What we should do better to improve a sound programming skills among most of IT Students?
on college days they r learning c,c++ and following faculties are also giving a road map of "programming means" thease languages only , even these are the languages are familier , where you justify them...
Amit Kumar
What are the qualities of a good Java trainer?
Good java trainers are always teaching their students with practical examples. This exactly happens in BEE Apprentice, our trainers are working in MNCs hence they are updated with technology and are best trainers.
Venu
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

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

Priority in TestNG
public class Priority { @Test (priority=1)public void login() {System.out.println("login");} @Testpublic void email1() {System.out.println("email1");} @Test (priority=-2)public void email2() {System.out.println("email2");} //I...
S

Sarthak C.

0 0
0

How can everyone prepare to clear any Java interview?
Java interview your java should be much strong then J2EE. core java and Advance java is the basic foundation for Interview. Some of the topic about which you should know before going for a java interview...

Hibernate 5
The Hibernate team published the first Hibernate 5 release quite a while ago, and since then they introduced a bunch of new features. I explained several of them here on the blog, and it’s about...
M

Mohammed Shahnawaz Akhter

2 0
0

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