Explain the use of ‘this’ keyword in Java?



Explain the use of ‘this’ keyword in Java?..

Answer / hrindows@gmail.com

In Java, ‘this’ keyword represents a specific reference on the current object. There are multiple uses for this keyword for referring to the current class properties from a variable, constructors, methods, and more. You can also pass this as an argument within constructors or methods. You can also fetch this as a return value from the current class instance. You can also refer to this as a static context.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net General Interview Questions

What is the difference between "using system.data;" and directly adding the reference from "add references dialog box"?

0 Answers  


which methos do you invoke on the dataadapter control to load your generated dataset with data?

0 Answers  


in hibernate, what is dirty reading?

1 Answers   IBM,


What are the advantages of .net core?

0 Answers  


Explain what is reflection in microsoft .net context?

0 Answers  






What are the new features in .net core?

0 Answers  


What exactly is being serialized when you perform serialization in .net?

0 Answers  


What is Method Overriding? How to override a function in C#?

1 Answers  


What is cyclomatic complexity and why is it important?

0 Answers  


What is boxing?

3 Answers  


What are the core differences between .NET Languages ?

0 Answers   TCS,


What is WSDL? Explain its architecture?

0 Answers   Amdocs,


Categories