java - Assign "this" to a variable -
Is there any such way in Java?
In PHP you can type $ someVar = $ this; and in javascript Yes, accepting the name of your class Alternatively, if you are in an internal, anonymous class, or something of choice, then the following will be done (given that you have var something = this;
MyClass < / P>
MyClass thisObject = this;
MyClass right now Too)
MyClass thisObject = MyClass.this;
Comments
Post a Comment