Can someone please explain why would TestClass constructor not getting called ? It works if I create an another class but not with the class containing main method ?
public class TestClass {
public void TestClass(){
System.out.println("initializing Test Class");
}
public static void main(String[] args) {
TestClass testClass = new TestClass();
}
}