source file

A text file containing program code as a person writes it, such as Hello.java.

In more detail

In Java a source file ends in .java and a public class inside it must have the same name as the file. The compiler turns source files into class files; the JVM never reads source files, except through the single-file launcher. Source code is also what goes into version control.

Example

Hello.java holds public class Hello

Related terms

Taught in

References