Explain the use of ‘this’ keyword in Java?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the differences between com architecture and.net architecture?

555


What is the reason of occurring overflow-underflow arithmetic exception error, it shows error message when we run our program by adding control?

509


Explain what is the difference between odbc and ado?

517


How will you do redo and undo in textbox control?

562


In code behind class, name the type of code found. Is it the server side code or client side code?

777






Difference between abstract class and interface in .net?

555


Please explain what is the difference between a class and an object?

572


what user controls are and what server controls are and the differences between the two.

1607


How viewstate is being formed and how it's stored on client in .net?

560


Tell us the differences between an interface and an abstract class in .net?

560


What is the concept of inheritance and how it works in .net?

542


What are the purposes of using .net?

606


Explain attributes in dot net?

564


Conceptually, what is the difference between early-binding and late-binding?

585


what is prototype design pattern in .net

570