I am preparing for ocjp 6 and I wanted to know what exactly a source code file is and why Java allows only one public class per source code file.
Thanks in advance
posted 1 year ago
Divya Koshy wrote:what exactly a source code file is
Surprisingly enough, a Java source code file is a file that contains Java source code.
Once you have written your Java source code, you use the compiler to compile the source file into one or more class files.
Divya Koshy wrote:why Java allows only one public class per source code file.
That question has been asked and answered many times on these forums - use the search.