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 an exception in java?

891


What is string in java?

776


How do I get the | symbol on my keyboard?

799


Which is better arraylist or vector?

807


What’s the difference between unit, integration and functional testing?

837


Why is stringbuffer not immutable?

795


What is a ternary operator in java? What is an interface?

781


Does windows 10 need java?

811


What is dynamic array in java?

768


What happens when a thread cannot acquire a lock on an object in java programming?

803


Can a constructor have different name than a class name in java?

845


Can you instantiate the math class?

836


When super keyword is used?

814


Is upper case in java?

749


Is linkedlist thread safe in java?

786