Can we execute a java program without a main() method? Now - no. Prior to Java 7: Yes, sequence is as follows: jvm loads classexecutes static blockslooks for main method and invokes it. So, if there's code in a static block, it will be executed. But there's no point in doing that. How to test that: public final class Test. Can we run a java program without using main method.Can a Java program contain more than one 'main. Why do we need classes in Java? Can we make programs with methods and main? Can I run a program in Java without.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2017
Categories |