What happens when a main method is declared as private?
Answer Posted / harsha
When a method is declared as private, the program compiles
properly but it will give runtime error ?Main method not
public"
Is This Answer Correct ? | 111 Yes | 8 No |
Post New Answer View All Answers
I want to persist data of objects for later use. What’s the best approach to do so?
What is io stream in java?
What does next mean in java?
Is vector synchronized in java?
FOR EXAMPLE WE R HAVING TWO LIST ELEMENTS ..BOTH LISTS CONTAINS ID,NAME,PLACE ..I NEED TO COMPARE BOTH IDS IN TWO LISTS,IF ID'S R SAME MEANS WE HAVE ADD THE DETAILS(LIKE NAME,PLACE) TO MAP...HOW IS POSSIBLE ?CAN ANY ONE SUGGEST?
What is difference between word and integer?
Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?
How to access arraylist elements in java?
What is the history of java?
What exactly is java?
What is treemap in java?
What are keywords in programming?
What is the difference between throw and throws keywords?
What is difference between printf and scanf?
Can a class declared as private be accessed outside it’s package?