What happens when a main method is declared as private?
Answer Posted / milanjeet singh
When we define main method as private, it will compile but when run, it show an Error as: main method is not found in the class, please define the main method as public static void main (String[] args)
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the difference between preemptive scheduling and time slicing?
What is string english?
What is jpa specification?
What is private static class in java?
Can a method be overloaded based on different return type but same argument type?
What is a void method java?
What is a marker interface?
How big is a boolean?
How many bytes is a string?
What is the main difference between java platform and other platforms?
How does split work in java?
What is the difference between interface & abstract class?
What is the technique adopted to create an immutable class?
Write java program to reverse string without using api?
Is it necessary for the port addresses to be unique? Explain with reason.