class A{
class B{
}
}
in which name u save the file,its the program compile?

Answers were Sorted based on User's Feedback



class A{ class B{ } } in which name u save the file,its the program compile?..

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

class A{ class B{ } } in which name u save the file,its the program compile?..

Answer / jasbir yadav

We can save the file as A.java

Is This Answer Correct ?    5 Yes 1 No

class A{ class B{ } } in which name u save the file,its the program compile?..

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

class A{ class B{ } } in which name u save the file,its the program compile?..

Answer / amulkumar

We can save the file using any name;
A.java or B.java

Is This Answer Correct ?    3 Yes 3 No

class A{ class B{ } } in which name u save the file,its the program compile?..

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

class A{ class B{ } } in which name u save the file,its the program compile?..

Answer / kalpana

output
-------

Inner classes cannot have static declarations

Is This Answer Correct ?    2 Yes 6 No

Post New Answer

More Core Java Interview Questions

How many bits is a double?

0 Answers  


why HashTable not allow null key and value

2 Answers   Crimson Logic,


if num=687; U have to get num=6+8+7;

4 Answers   CMC,


Is it possible for yielded thread to get chance for its execution again ?

0 Answers  


What is the difference between final, finally and finalize() in java?

0 Answers  






how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread

0 Answers  


what is difference between throw and throws in exception?

48 Answers   Spenco,


What are different types of multitasking?

0 Answers  


Why vector is used in java?

0 Answers  


Which number is denoted by leading 0x or 0x in java?

0 Answers  


Which variable is the independent variable?

0 Answers  


how is final different from finally and finalize in java?

0 Answers   DELL,


Categories