public class First{
public void showData(){
System.out.println("Can't emagine life without java");
}
public static void main(String[] args){
First p=new First();
p.showData();//work well
this.showData()//Not work
}
}
Helo sir in the above code as we know taht "this" is also an object of First class as same as p then why calling this.showData() doesn't work.
withe regard
Arun kumar maalik
public void showData(){
System.out.println("Can't emagine life without java");
}
public static void main(String[] args){
First p=new First();
p.showData();//work well
this.showData()//Not work
}
}
Helo sir in the above code as we know taht "this" is also an object of First class as same as p then why calling this.showData() doesn't work.
withe regard
Arun kumar maalik