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

Q

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

✍: Guest

A

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

2013-06-24, 2015👍, 0💬