adspace


What happens when a main method is declared as private?

Answer Posted / yogesh gandhi

Wrong Vani.

The output of the program is

C:\>javac abc.java

C:\>java abc
Main method not public.

Is This Answer Correct ?    72 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to print count of empty strings in java 8?

1093


What do you mean by an interface in java?

1108


Explain public static void main(string args[]) in java.

1086


What are the differences between heap and stack memory in java?

1151


What is the difference between break and continue statements?

1133


What is an object in java and how is it created?

1149


Write a program to find the whether a number is an Armstrong number or not?

1108


How to sort array in descending order in java?

1002


How to create a base64 decoder in java8?

1151


Realized?

2276


What is java string pool?

1090


What is a classloader in java?

1098


What is a constructor overloading in java?

1132


Is minecraft 1.15 out?

1053


explain different ways of using thread? : Java thread

1091