Page 1 of 1

Java File Structure Question

Posted: Thu Oct 14, 2010 7:09 pm
by james
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

Re: Java File Structure Question

Posted: Sat Oct 16, 2010 10:30 am
by angus
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