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 two main parts of the .net framework?

645


Whate are resource files?

688


Write the .net syntax for 'while loop'?

662


Explain .NET architecture?

726


Explain re-clarification of object based in .net?

659






How big is the datatype int in .net?

649


Please explain what is the difference between encrypting a password and applying a hashing?

624


What is the difference between .net and laravel?

647


What is .net core used for?

632


What is typical about a windows process in regards to memory allocation in dot net?

661


What are pdbs?

676


Is there any inbuilt tool or command provided by .NET to view the code inside the assembly?

696


Explain is the jit an interpreter?

664


Explain me why do we use msmq?

650


What are code contracts?

681