A person says that he compiled a java class successfully without even having a main method in it? Is it possible?



A person says that he compiled a java class successfully without even having a main method in it? Is..

Answer / Rishish Mishra

No, the main method is essential for executing any Java application. Without a main method, the program cannot be executed.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What are class members by default?

1 Answers   Hexaware,


how are methods defined?

1 Answers  


What is OOP Language?

1 Answers   Atos Origin,


What is the difference between path and classpath variables?

1 Answers  


Why put method is idempotent?

1 Answers  


When arithmeticexception is thrown?

1 Answers  


Which is better ascii or unicode?

1 Answers  


How do you sing an Applet ?

1 Answers  


What is the difference between replace and replace all?

1 Answers  


what is class.forname() and how it will be useful ?

3 Answers  


Explain about class in java?

1 Answers  


what difference between throw and throws in exception handling.

5 Answers  


Categories