Difference between instantiate object in class and in constructor of class?
Is this a same thing? If not, what is the difference?
public class WhatEver{
SomeClass cl = new SomeClass();
//constructor
public WhatEver();
}
public class WhatEver{
//constructor
public WhatEver() {
SomeClass cl = new SomeClass();
}
}