Can we write a class without main method in java?



Can we write a class without main method in java?..

Answer / Pallavi Saxena

Yes, it is possible to write a class without a main method. Such classes cannot be executed on their own.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What are types of Java applications?

14 Answers  


what is Abstract DataType?

1 Answers  


Explain the use of shift operator in java. Can you give some examples?

1 Answers  


23. Storage space in java is of the form Stack Queue Heap List 24. What is java code embedded in a web page known as Applets Servlets scriptlets snippets 25. Which of the following attributes are compulsory with an <applet> tag?. code,height & width. 26. What does 'CODEBASE' in an applet tag specify?. Files absolute path.

1 Answers   TCS,


Which of these methods belong to Thread & Object class? join, yield, sleep, wait, notify

3 Answers   Ericsson,


What is the functionability stubs and skeletons?

1 Answers  


Can we instantiate Interfaces?

7 Answers   Ericsson,


Why can we not override static method?

1 Answers  


Is space a string in java?

1 Answers  


Define how does a try statement determine which catch clause should be used to handle an exception?

1 Answers  


what are depricated methods ?

5 Answers   Satyam,


What is variable length arguments in java?

1 Answers  


Categories