Skip to content
AgileLogics
3 min read

Packages & Imports

Prerequisites: Access modifiers

A package groups related classes and mirrors a folder structure on disk, conventionally reverse-DNS style:

package com.example.myapp;

import java.util.List;
import java.util.ArrayList;

Classes in java.lang (like String and Math) are imported automatically and never need an explicit import.