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
Can a constructor call the constructor of parent class?
Is list ordered in java?
What is ‘has a’’ relationship in java?
Where and how can you use a private constructor?
Why are data types important?
When we should use serialization?
What is the use of default method in interface in java? Explain
How many types of string data types are there?
What are three ways in which a thread can enter the waiting state in java programming?
What is join () in java?
what is the role of xml in core java?? and how we can use it?? can somebody give a sample program with explanation and from where i can read more about xml?????
What is the ==?
What is empty string literal in java?
Explain aggregation in java?
What are the 7 types of characters?