1.

Is the main method mandatory in Java? If Yes/No please support your Solution with proof. ​

Answer»

Solution To Your Question ↓    Yes, we can execute a java program without a main method by using a static block. Static block in Java is a group of statements that gets executed only once when the class is loaded into the memory by Java ClassLoader, It is also known as a static initialization block.   😁? Hope You Liked It 😁?    Mark Me as the brainliest and Follow Me 💗?



Discussion

No Comment Found