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

What is meant by stack and queue?

0 Answers   GrapeCity,


what is sendredirect?

7 Answers   TCS,


What is an abstract method in java programming?

0 Answers  


what is comparable and comparator interface?

0 Answers  


Does list allow duplicates in java?

0 Answers  






What is the difference between equals() and == in java?

0 Answers  


What is the difference between static method and instance method in Java?

0 Answers   SwanSoft Technologies,


How to sort a vector elements that contains the user define class object? (Note: If Suppose consider, A Student class contain two data members. They are String studentName and int rollNo. I am creating Four objects for this class, each object contains students details like name and roll no. Now i am storing that objects in vector and if i retiving the elements from the vector means then it should be display in sorting order)

3 Answers   ProdEx Technologies,


Which category the java thread do fall in?

0 Answers  


State the significance of public, private, protected class?

0 Answers  


What is the difference between Synchronizing mehtod & Synchronizing block?

2 Answers  


Explain about GridBag Layout?

1 Answers  


Categories