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
Explain inheritance in java?
How to stop a thread in java? Explain about sleep () method in a thread?
What is static import?
What is object in java?
Can we call a non-static method from inside a static method?
What is size_t?
How many types of flags are there?
what is thread? What are the high-level thread states? Or what are the states associated in the thread? : Java thread
What are the application of stack?
Can a static class have a constructor?
What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?
Is list thread safe in java?
How to invoke external process in java.
What is a consumer in java?
What is string syntax?