could you run the java program without main method?
Answer Posted / amit singh
please put the System.exit(0) in static block thanks
class Moon
{
static
{
System.out.println("hello i am visible without main");
System.exit();
}
}
amit singh
amising2008@gmail.com
Is This Answer Correct ? | 29 Yes | 8 No |
Post New Answer View All Answers
Why is it called boolean?
What java ide should I use?
How do you compare values in java?
Is zero a positive integer?
What are strings in physics?
Which graphs are functions?
What is assembly condition codes?
What is collection class in java? List down its methods and interfaces.
What are recursive functions?
Can list be final in java?
State one difference between a template class and class template.
What is mean by exception?
What is meant by collection in java?
What classes of exceptions may be thrown by a throw statement?
How big is a 64 bit float?