# Source File

say it: **“SORS FYLE”** **/sɔːrs ˈfaɪl/**

A text file containing Java code for the compiler to read.

## What is **Source File** in Java?

**Source File** — A text file containing Java code for the compiler to read.

```java
class Greeting {
    String message = "Hello, Java!";
}
```

Level: Novice · [More Java terms at this level](https://www.ask-codey.com/glossary?category=java&level=1)

Updated: November 17, 2026

Source: https://www.ask-codey.com/glossary/source-file
