Answer Posted / ashok reddy
2 ans for this question.
1.in a class class name and the constructor is must. so we cant write a file without class.(for this reason only the compiler adds a default constructor)
2.dont write anything inside a text doc(Empty text doc) and save this file as somename.java. it is possible to compile this file but it doesnot produce any .class file.
| Is This Answer Correct ? | 14 Yes | 6 No |
Post New Answer View All Answers
How many decimal places is a double?
What is entry set in java?
Explain the use of javap tool.
What is difference between null and void?
Explain the difference between abstract classes and interfaces in java?
Describe how to implement singleton design pattern in struts.
What is the difference between compiler and jvm?
What is string intern in java?
What is primitive data type in java?
What checkbox method allows you to tell if a checkbox is checked?
How to compare strings in java?
What is cr keyboard?
What is anonymous inner class?
What is difference between hashset and hashmap?
what is the difference between thread and runnable types? : Java thread