What does this() represent, and how is it used in Java?

Answer Posted / hr@tgksolutions.com

The current instance of a class is represented by this().
• Previously used to: o Call the same class's default constructor
Access the current class's methods
o Indicate the instance of the current class.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the main use of java?

852


What is difference between array and arraylist in java?

721


What is meant by overloading?

824


What is type parameter in java?

721


What is the new line character?

846


what is use of functional interface in java 8?

796


Explain why wait(), notify() and notifyall() methods are in object class rather than in the reading class?

761


What is the purpose of assert keyword used in jdk1.4.x?

773


What is space character in java?

797


What are new features introduced with java 8 ?

749


Explain different ways of creating a thread?

776


What is an error in java?

872


Can we have multiple catch block for a try block?

796


Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?

827


Is there a way to increase the size of an array after its declaration?

818