What happens when a main method is declared as private?

Answer Posted / subha narayan mohapatra

it will generate an error message because main() method is
the start or execution point in our java program.

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does split work in java?

537


What is variable and its types?

547


why not override thread to make a runnable? : Java thread

561


What are the differences between stringbuffer and stringbuilder?

545


Can we pass a primitive type by reference in java? How

534






Can we use a switch statement with strings?

554


How do you input a string in java?

505


Can private method static?

475


What does int [] mean in java?

538


Can substring create new object?

564


Is math an abstract class in java?

540


Why chararray() is preferred over string to store the password?

532


What is difference between checked and unchecked exception in java?

584


What does @override mean?

536


What is the parse method in java?

573