what is difference between following variable usages
public class A{
B b= new B();
public void doSomething()
{
b.callme();
}
}
I was just trying out a similar scenario, but due to a mistake I created a scenario for recursion instead (StackOverflow error):-
public class Test{
Test t=new Test();
public static void main(String[] args) {
Test t=new Test();
System.out.println("Hello");
}
}
I think it might be helpful to some for the conceptual purpose.