answersLogoWhite

0

What does the 'this' reference do in Java?

Updated: 8/17/2019
User Avatar

Wiki User

15y ago

Best Answer

Represents the current object (not usable in static methods).

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What does the 'this' reference do in Java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Does java support call by reference?

No , Java does not support call by reference.


What are the differences between C and Java reference variables?

Java does not have the concept of Reference Variables. We cannot access the memory location where the data is stored in Java.


Which is the best Book to understand JAVA in short?

You can use Head First Java or Java Complete Reference to learn Java.


What is the best book of java language?

the best book of java is java complete Reference 2nd edition.


What has the author Patrick Niemeyer written?

Patrick Niemeyer has written: 'Learning Java' -- subject(s): Java (Computer program language) 'Learning Java' -- subject(s): Java (Computer program language), Java (programmeertaal) 'Java Reference Library on the Web'


In java all variables declared using a class are?

Reference variables


How can you study easy to develop applications using java?

There is a good book called Java - The Complete Reference. This would be a good place to start.


Why pass by reference is quicker than pass by values in java?

Pass by Reference does not create a copy of the data items. So, it is faster.


Difference between reference and object in java?

On the lower level of Java, a "reference" can be thought of like a pointer in C. It is essentially an integer which refers to (points to) a location in memory where the object data exists. // "button" is a reference to a JButton with a "1" on it (the object). JButton button = new JButton("1");


What is the difference between reference and hashcode?

There is no relation between reference and hascode, Java reference is unique pointer which refers an object. so each object will have a unique reference. but 2 diff object can have same hashcode.


How do you delete reference of an object in java?

You can't really delete a reference to an object. You can set the reference to null, which will eventually cause the garbage collector to free up the memory from that reference, but you cannot explicitly delete anything.


Define dangling if in terms of java?

A dangling reference is less problematic in Java, because the garbage collector will eventually delete any object that is unreachable. So, even if one object has a reference to a second object, and the second has a reference to the first object, they would eventually be destroyed if they are unreachable from the objects referenced on the stack.A dangling reference is less problematic in Java, because the garbage collector will eventually delete any object that is unreachable. So, even if one object has a reference to a second object, and the second has a reference to the first object, they would eventually be destroyed if they are unreachable from the objects referenced on the stack.A dangling reference is less problematic in Java, because the garbage collector will eventually delete any object that is unreachable. So, even if one object has a reference to a second object, and the second has a reference to the first object, they would eventually be destroyed if they are unreachable from the objects referenced on the stack.A dangling reference is less problematic in Java, because the garbage collector will eventually delete any object that is unreachable. So, even if one object has a reference to a second object, and the second has a reference to the first object, they would eventually be destroyed if they are unreachable from the objects referenced on the stack.