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
Explain about join() method?
What is the old name of java?
What is method overriding in java ?
What is stringwriter?
What are the legal operands of the instanceof operator?
How infinite loop is declared?
what is comparable and comparator interface?
What is a generic data type?
Can we convert stringbuffer to string?
Can we overload the main() method?
What is the program compilation process?
Explain how to convert any java object into byte array.
If a variable is declared as private, where may the variable be accessed?
Is void a type?
How can I right-justify a string?