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

Explain is the jit an interpreter?

0 Answers  


What does SCM do?

2 Answers  


When we go for html server controls and when we go for web server controls?

0 Answers  


What is RCW (Run time Callable Wrappers)?

2 Answers  


What is an anonymous method and how is it different from a lambda expression?

0 Answers  






Explain what is the difference between a class and an object, and how do these terms relate to each other?

0 Answers  


What is singlecall activation mode used for in .net?

0 Answers  


How to implement CAS in .Net?

0 Answers   247Customer,


How to get the hostname or IP address of the server?

2 Answers  


What is the use of trace utility?

1 Answers  


What does cil do?

0 Answers  


What do you mean by web service?

0 Answers   Accenture,


Categories