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
What is a consumer in java?
Can we create our own wrapper class in java?
What is %d in printf?
Can we declare the static variables and methods in an abstract class?
Why pass by reference is not possible in java?
Is upper case in java?
What is the difference between reader/writer and inputstream/output stream?
Write a method to check if input string is palindrome?
What is the difference between the ">>" and " >>>" operators in java?
What are green threads in java?
What is the use of object and class classes?
What is a boolean field?
What isan abstract class and when do you use it?
How to change value in arraylist java?
Can a class be protected in java?