A
is another class outside of test
case 1:
public class Test{
A testObj;
public static void main(String[] args){
testObj=new A();
testObj.methodInsideClassA();
}
}
case 2:
public class Test{
public static void main(String[] args){
A testObj = new A();
testObj.methodInsideClassA();
}
}
so whats the difference between them? And what should I use?