What happens when a main method is declared as private?
Answer Posted / srinivasa
JVM is also a program. If main() is declared as privateit
is not available outside of that class . So JVM through the
exception.
| Is This Answer Correct ? | 15 Yes | 5 No |
Post New Answer View All Answers
When do we use hashset over treeset?
What is main in java?
Explain the access modifiers for a class, method and variables?
What is a predicate method?
What is the use of runnable interface?
Explain the difference between collection api and stream api in java8?
Is minecraft java edition free?
Is a class an object?
What is predicate in java?
Java.util.regex consists of which classes?
Explain public static void main(string args[]) in java.
Why do we need variables?
What methods are used to get and set the text label displayed by a button object?
What are the two types of java programming?
What is the difference between yielding and sleeping?