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

}
}

explain me that the above code is error or exception

Answer Posted / bhargava

Code will throw exception. Because usually every stand
alone program execution should start with main method. It
should be public other wise this method doesnt exposed to
out side to run.

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does 3 dots mean in java?

741


What is the basic difference between string and stringbuffer object?

822


What is hashmap and map?

741


Why a dead thread occurs?

775


Why 1 is not a prime number?

787


How to create an immutable class?

772


Is there any limitation of using inheritance?

808


Can one thread block the other thread?

789


What is oop in java?

718


What are different types of constants?

729


How do you define a parameter?

794


Explain creating threads by extending thread class ?

772


What is the difference between iterator and enumeration ?

745


What is default constructors?

735


design an lru cache in java?

743