we have a 100 classes at that time which class we have to
write main method? pls help me
Answers were Sorted based on User's Feedback
Answer / ankit sangal
we should write the main method in that class from where we want to start the compilation.
| Is This Answer Correct ? | 16 Yes | 1 No |
Answer / pravallika
we can write main method in any class is possible.
| Is This Answer Correct ? | 9 Yes | 1 No |
Hey All,
I Think if we have 100 class we write main method wihin
any class just we should mention class name in mainifest
file before calling.mainfest main work is tp provide main
class name to jvm.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / pravallika
But compile time point of view main method is not required.so we can write main method in any one class is possible.
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / john kennedy
The class which has the connection or relationship with all
other classes can be main class.
| Is This Answer Correct ? | 0 Yes | 0 No |
extending thread class or implementing runnable interface. Which is better? : Java thread
What is definition and declaration?
What is the difference between error and an exception?
What is java virtual machine and how it is considered in context of java’s platform independent feature?
What is a stack class in java ?
0 Answers Akamai Technologies,
Is static a singleton?
What is thread pool? How can we create thread pool in java?
Is JRE required to compile Java files ?
What are the three parts of a lambda expression? What is the type of lambda expression?
How do you convert bytes to character in java?
What is the use of :: in java?
When does the compiler supply a default constructor for a class?