Posts

Showing posts from February, 2026

Notes for Core Java Volume I (12th): Note 1

 Package & Jar In Java Attribution Note: These notes are comprehensive study materials derived from Core Java Volume I  (12th Edition) by Cay S. Horstmann. The technical explanations, concepts, and many examples are based on the book's content.  In Java, the word "package" has two meanings depending on context: 1. The Noun (Java `package`) : The namespace organization system for your code. 2. The Verb (Packaging a Project) : The process of bundling your compiled code and resources into a distributable file (usually a JAR). Part 1: The Java `package` (Organization) Before you can bundle code, it must be organized. Java uses a hierarchical system that mirrors the file system. 1. The Concept A package is a namespace that groups related classes and interfaces. It solves two main problems: - Naming Collisions : Two de...