Source File and Java File - Java Quiz Question


Which of the following is correct?

X: An empty ".java" file is not a valid source file.
Y: A ".java" file can contain more than one java class, provided at the most only one of them is a public class.


A
X only
B
Y only
C
Both are correct
D
Both are incorrect