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 do you mean by formatting?
when a request is generated from apache tomcat 5.5 and goes to oracle 10g or mysql,,, how the oracle or mysql reads the request as apache is a web server and oracle 10g is application server? when the oracle 10g provides response, how the apche tomcat reads it???
How is hashset defined in java?
Explain public static void main(string args[]) in java.
How do you find the absolute value?
What is the loop in java?
What is the meaning of 3 dots in java?
Explain thread life cycle in java?
What is a static method in java?
What is fail fast in java?
Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?
What is the private method modifier?
How to display all the prime numbers between 1 and n (n is the number, get the input from user)
Explain the difference between a Thread and a Process.
Can we pass a primitive type by reference in java? How