could you run the java program without main method?
Answer Posted / naga
yes,we can write and run a java program without using the
main method.
i.e By using static
example program...!
public void static( )
public class
{
public void static( )
{
System.out.println( "Without main method" );
System.exit(0);
}
}
| Is This Answer Correct ? | 23 Yes | 22 No |
Post New Answer View All Answers
Can we clone singleton object in java?
Is string a class in java?
What is the difference between static and global variables and also define what are volatile variables?
How do you replace a string in java?
Why Java doesn’t support multiple inheritance?
Can you write a java class that could be used both as an applet as well as an application?
What is the use of isempty in java?
What are the 3 types of loops in java?
write a program that list all permutations of ABCDEF in which A appears before B?
What is the default access specifier for variables and methods of a class?
Is this valid in java ? Can we instantiate interface in java?
How do you identify independent and dependent variables?
Is null a keyword in java?
What language is java written?
What is a pattern what is an anti pattern?