Loading means when a class is loaded. So in this case when java.io.* and java.custom.* are imported in the class, does that mean loading ? int num=20 is initializing of num
If there is s static initializer block in this code or in java.Custom, will it be executed immediately with loading of class (ie on import of class) ?
If I want to test, how can I test this ? If I want to load the class, then I will have to run this code as "java TestLoading" , and it will execute main(). So even if a static initializer block runs on loading, I will not be able to know that. Is there a way, I wan stop execution of code after loading ? Or is there a way I can just run class upto loading and not any further ?