class test
{
private static void main(String []adsf)
{

}
}

explain me that the above code is error or exception

Answer Posted / sri

It will not generate any compile time error, but while
running the program it will generate the output as "main
method is not public".....

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is nested top-level class?

568


what is synchronization and why is it important? : Java thread

574


What is final variable?

482


Does isempty check for null?

536


What is the purpose of extern variable?

519






Why vector is used in java?

541


What is a finally block?

542


Difference between arraylist and vector.

575


A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.

529


What is the program compilation process?

571


How to compare strings in java?

490


Which is easier .net or java?

627


What is a local block?

624


How we can generate random numbers in java?

595


Explain about serializable interface in java?

566