class A{
class B{
}
}
in which name u save the file,its the program compile?
Answers were Sorted based on User's Feedback
Answer / vipul
We can save the program by any name either A or B,
Program will compile but will not run......
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / neelanand
Since the program is compiled, we can save it with any
filename with .java extension eg. abc.java
but if you want to use it into other program we must save
it with the A.java
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / amulkumar
We can save the file using any name;
A.java or B.java
| Is This Answer Correct ? | 3 Yes | 3 No |
Answer / venkat
We can sava it as any class name in it. But it will not
compiled
inorder to the without of mainclass.
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / kalpana
output
-------
Inner classes cannot have static declarations
| Is This Answer Correct ? | 2 Yes | 6 No |
how tha garbage collector know that the object will be deleted? on which algorithm the garbage collector works? what is the working principle of garbage collector? How manay types of garbage collectors r there?
why java is not supporting multiple inheritence?
What is Java Package and which package is imported by default?
What are the types of statement? explain
When do we use synchronized blocks and advantages of using synchronized blocks?
Can you declare the main method as final?
Why is java logo a cup of coffee?
How to implement an arraylist in java?
Hi ,i convert contrller as jSp And presentation as servlet ...will it do? if so what are advantage and idsadvantages
Explain about assignment statement?
Is hashset ordered java?
Can constructor be synchronized?