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

Explain the difference between intermediate and terminal operations in java8?

0 Answers  


Is java a super set of javascript?

0 Answers  


What is java class writing rules?

1 Answers   Oracle,


Can we create object of static class?

0 Answers  


Can there be an abstract class with no abstract methods in it?

1 Answers  






What is casting?

3 Answers   BMC,


what is the purpose of using rmisecuritymanager in rmi?

0 Answers  


what is the use of clone method? why user cant overwrite in sub class without its proper defination.

2 Answers   TCS,


What is constructor chaining and how is it achieved in java?

0 Answers  


Map map = new HashMap(2); map.add(“1”,”one”); map.add(“2”,”two”); map.add(“3”,”three”); What will happen at this line?

5 Answers   Rolta,


What is static data type in java?

0 Answers  


java Api provided try catch finally ,try catch(its ok) but why try finally and exception occured at try then how the flow is?

1 Answers   Naaptol,


Categories