Home » Interview » Technology

Can we compile a java program without main?

Correct Answer: Yes, we can In order to compile a java program, we don't require any main method But to execute a java program we must have a main in it (unless it is an applet or servlet) Because main is the starting point of a java program

← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion