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 do you ensure that n threads can access n resources without deadlock?

1095


What is the difference between JDBC 1.0 and JDBC 2.0?

2929


When do I need to use reflection feature in java?

832


What are the loops in java?

767


Can we declare register variable as global?

746


What are the procedures?

843


What is supplier in java?

794


What is ph and buffers?

751


Can sleep() method causes another thread to sleep?

800


Why singleton is not thread safe?

800


What is the default access specifier for variables and methods of a class?

869


Can we clone singleton object in java?

805


Why is stringbuffer faster than string?

709


How to read and write image from a file ?

813


What is autoboxing and unboxing?

777