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
What does java final mean?
What is io stream in java?
What is collection api?
Explain yield() method in thread class ?
What is the difference between serializable and externalizable interface?
What does yield method of the thread class do?
Explain different forms of polymorphism?
Can you use abstract and final both with a method?
What state does a thread enter when it terminates its processing in java programming?
Can an interface have a class?
What is java instanceof operator?
What does the three dot emoji mean?
Difference between doublesummarystatistics, intsummarystatistics and longsummarystatistics ?
When we should use serialization?
What are loops in java? What are three types of loops?