---
spec: JLS
title: "The Java Language Specification"
edition: "Java SE 8 Edition"
java_version: 8
chapter: "Chapter 6. Names"
section: "6.5.3"
heading: "6.5.3. Meaning of Package Names"
parent: "6.5. Determining the Meaning of a Name"
source: https://docs.oracle.com/javase/specs/jls/se8/html/jls-6.html#jls-6.5.3
id: "6.5.3"
url: https://jvm.obfuscated.software/jls/se8/6.5.3.html
raw: https://jvm.obfuscated.software/jls/se8/6.5.3.md
---

# 6.5.3. Meaning of Package Names

The meaning of a name classified as a *PackageName* is determined as follows.

## 6.5.3.1. Simple Package Names

If a package name consists of a single *Identifier*, then this identifier denotes a top level package named by that identifier.

If no top level package of that name is in scope ([§6.3](6.3.md)), then a compile-time error occurs.

## 6.5.3.2. Qualified Package Names

If a package name is of the form `Q.Id`, then `Q` must also be a package name. The package name `Q.Id` names a package that is the member named `Id` within the package named by `Q`.

If `Q` does not name an observable package ([§7.4.3](7.4.3.md)), or `Id` is not the simple name of an observable subpackage of that package, then a compile-time error occurs.
