Horje
Example of "this" : to invoke current class method Code Example
Example of "this" : to invoke current class method
class A{  
void m(){System.out.println("hello m");}  
void n(){  
System.out.println("hello n");  
//m();//same as this.m()  
this.m();  // By default added by the compiler
}  
}  
class TestThis4{  
public static void main(String args[]){  
A a=new A();  
a.n();  
}}




Java

Related
get input in java Code Example get input in java Code Example
how to set up basic java workspace Code Example how to set up basic java workspace Code Example
games Code Example games Code Example
fill a 2d array java Code Example fill a 2d array java Code Example
java application Code Example java application Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7