Java File Structure Question

Post Reply
james
Posts: 12
Joined: Thu Apr 08, 2010 10:07 am

Java File Structure Question

Post by james » Thu Oct 14, 2010 7:09 pm

With all these interfaces and classes, do they all need to be in separate Java files? Can my two interfaces be in one Java file? I know the class containing the main method has to have a class name and file name that match, but what about other files?

James

angus
Posts: 43
Joined: Fri Apr 02, 2010 1:54 pm

Re: Java File Structure Question

Post by angus » Sat Oct 16, 2010 10:30 am

Hi, each public class and public interface should be in its own file, which is named the same name as the class or interface, ending with ".java". -A

Post Reply