To refer to a method in the same class, use the keyword this.Example of Using ThisA class has a method called myMethod() and another called run(). The run()
method calls the myMethod() method.
1 2 3 4 | public void run() { this.myMethod(); } |
Best Regards,
Hossein Karimi
No comments:
Post a Comment