Java Tutorial | Packages in Java

Опубликовано: 25 Июнь 2026
на канале: ARIVU INFO
6
0

packages to avoid name conflicts, and to write a better maintainable code. Packages are divided into two categories:
Built-in Packages (packages from the Java API)
User-defined Packages (create your own packages)
Built-in Packages:
The Java API is a library of prewritten classes, that are free to use, included in the Java Development Environment.
The library contains components for managing input, database programming, and much much more.
The library is divided into packages and classes. Meaning you can either import a single class (along with its methods and attributes), or a whole package that contain all the classes that belong to the specified package
Import a Package:
There are many packages. In the previous example, we used the Scanner class from the java.util package. This package also contains date and time facilities, random-number generator and other utility classes.
To import a whole package, end the sentence with an asterisk sign (*). The following example will import ALL the classes in the java.util package:
Example
import java.util.*;
If this video is useful to you, please like and share If you didn't subscribe kindly subscribe. So that you will get a notification about my new videos

Python Course full playlist:    • Python Tutorial in Tamil  
C Language Course full playlist:    • C Language Full Course  
Python Course English full playlist:    • Python Tutorial in English  
Java Course English full playlist:    • Java Tutorial in English  


Subscribe to our channel by clicking here 👉👉🏾    / @arivuinfo_6666  
#ARIVU_INFO