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 are the benefits of Model-View-Controller Architecture?

1 Answers  


How many types of exception handlers are there in .NET?

2 Answers  


What is meant by globalization and localization?

0 Answers  


What is the difference between imperative and interrogative code?

0 Answers  


What are the Project related questions generaly asked in the interview. Mail to: ana_net1@yahoo.com

2 Answers   TCS,






How Can Creating Installation Components in .Net?

1 Answers  


How does the generational garbage collector in the .net clr manage object lifetime? What is non-deterministic finalization?

0 Answers  


How does cas works?

0 Answers  


What is iis? Have you used it?

0 Answers  


What is Finalizer in .NET define Dispose and Finalize ?

0 Answers   MCN Solutions,


How can you manage pagination on a page using .Net?

1 Answers  


What is the Difference between directcast and ctype?

3 Answers   Wipro,


Categories