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
Is space a char?
Write java program to reverse string without using api?
What is valid keyword in java?
What is the core java?
If a class is declared without any access modifiers, where can the class be accessed?
take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).
If a method is declared as protected, where may the method be accessed?
What is visibility mode?
What is the difference between abstract class and interface1? What is an interface?
What is a values collection view ?
Explain what is Marker interface?
What is java virtual machine and how it is considered in context of java’s platform independent feature?
Can we write a class without main method in java?
Difference between serialization and deserialization in java?
What is temp in java?