Core Java Tutorials


Introduction

Java Hello World

Java Compilation

JDK New Features

JVM Architecture

Java OOPs Concepts

Java Package

Array

Exception Handling

String

Immutable Class

File Handling

Serialization

MultiThreading

Volatile

Concurrent Package

Collection

Collection Internal

Generics

Cloning

Reflection In Java

Annotation

Class Loader

Java Inner classes

Garbage Collector

JDBC

References In Java

Heap Dump & Thread Dump

Package In Java

package-in-java

  Package in java acts as container for the classes and which is used to oraganized java classes as per it's functionality. Java packages can be stored in compressed files called JAR files. Package are used in Java, in-order to avoid name conflicts and to control access of class, interface and enumeration etc. This plays really an important role specifically when we are working with big projects to organize classes into meaningful packages/directory structure.
 Project Package Structure:-
project-package


 Java Package Example:-
java-package-example


 Importing package in Java
import-package-in-java
 private access specifier in Java
private-access-specifier
 default access specifier in Java
default-access-specifier