You are here: Home / Topics / What will happen if we declare don’t declare the main as static?

What will happen if we declare don’t declare the main as static?

Filed under: Java Interview Questions on 2024-10-25 14:29:59

We can declare the main method without using static and without getting any errors. But, the main method will not be treated as the entry point to the application or the program.

About Author:
J
Java     View Profile
Hi, I am using MCQ Buddy. I love to share content on this website.