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
Which command from the jdk compiles a java program?
How will you reverse a singly-link list?
Can you use abstract and final both with a method?
Difference between collection, collection and collections in java?
How can we pass argument to a function by reference instead of pass by value?
What are the two types of java programming?
Write a program to find the whether a number is an Armstrong number or not?
What is the purpose of the runtime class in java programming?
Can we have two methods in a class with the same name?
Can set contain duplicates?
what is meant wrapper classes?
Can I overload to string method
How do you sort in descending order in java using collections sort?
Explain the importance of finally over return statement?
what is encapsulation in java? Explain