Hi friends ,
Why cant we access a method from another method using the instance as shown below
class palindrome{
static int a,b,c;
void j(){
System.out.println("hi");
p.g();
}
void g(){
a=10;
b=20;
c=40;
System.out.println(a+" "+ " "+b+" "+ " "+c );
}
public static void main(
String args[]){
palindrome p=new palindrome();
p.j();
}
}
Please clarify my doubt friends