Question 6
Back to Exercise
A file contains public class Invoice { … }. What must the file be called?
- A Main.java
- B Invoice.java Correct
- C invoice.java (any case)
- D Any name ending in .java
Correct Answer: Option B
The name must match exactly, including case. A file may contain at most one public top-level class.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!