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



we have a 100 classes at that time which class we have to write main method? pls help me..

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

we have a 100 classes at that time which class we have to write main method? pls help me..

Answer / pravallika

we can write main method in any class is possible.

Is This Answer Correct ?    9 Yes 1 No

we have a 100 classes at that time which class we have to write main method? pls help me..

Answer / venky

yes,we can write in any class

Is This Answer Correct ?    8 Yes 0 No

we have a 100 classes at that time which class we have to write main method? pls help me..

Answer / dinesh tiwari

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

we have a 100 classes at that time which class we have to write main method? pls help me..

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

we have a 100 classes at that time which class we have to write main method? pls help me..

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

Post New Answer

More Core Java Interview Questions

I want to run a simple hello world java (HelloWorld.java) program using a batch file. How can i run it and how to construct a batch file.

1 Answers   Infosys,


Howmany number of objects we can store in an ArrayList. Is there any limit?

7 Answers   TCS,


i need example for java abstraction. where we use abstraction and why we need abstraction.

2 Answers   Oracle,


Marker interface means , interface which has no methods.Then what is the necessity of its usage.I read "it tells the compiler that it should be treated differently ". "It is used to store state of an object". But still am not clear.Please explain clearly.

2 Answers  


What are wrapped classes?

7 Answers   Samsung,






What is the difference between constructor and method?

4 Answers  


What are default methods ?

0 Answers  


What is java thread dump, how can we get java thread dump of a program?

0 Answers  


Can you override a private or static method in java?

1 Answers  


Can we have a abstract class withought any method? What is a purspose of this?

3 Answers  


How do you convert bytes to character in java?

0 Answers  


What is a boolean in java?

0 Answers  


Categories