DEVFYI - Developer Resource - FYI

Can a .java file contain more than one java classes?

Java Interview Questions and Answers (part 3)


(Continued from previous question...)

549. Can a .java file contain more than one java classes?

Yes, a .java file contain more than one java classes, provided at the most one of them is a public class.

(Continued on next question...)

Other Interview Questions