Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
runner = new Thread(this, threadName)
Posted

Here.[^]
 
Share this answer
 
v2
The keyword "this" in Java means exactly the same as in C# and C++ and, say, the same as "self" in VB.NET and Delphi.

This is a reference to the type's instance (object) accessible by a non-static method (also called instance method). Technically, it is passed to instance method or property as an additional implicit parameter, in contrast to static methods/properties.

As this is exactly the same thing in the named languages, please see my explanation of how it works in my past answers about C# and C++:
What makes static methods accessible?[^],
Catch 22 - Pointers to interface objects die when function using them is made static.[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900