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 are the types of literals?
What is a war file?
What is the purpose of garbage collection in java, and when is it used?
Why you should not use singleton?
what is mutual exclusion? : Java thread
What does system out println () do?
Which collection is sorted in java?
How to change value in arraylist java?
How to check if linked list contains loop in java?
What is a JAR file?
What is mnemonic code?
What is java full form?
What is java console application?
Can constructor be inherited?
What is the use of isempty in java?