Package in Java :
Java uses the concept of package to grouped classes together.
Packages are used to reuse an existing without physically copying the code.
There are two types of packages -
1. Built-in package / Predefined Package
Ther are predefined and the part of the language.
Java has many built-in packages like - util, lang, awl, sql,...etc.
2. User-define package
They created by programmer package keyword is used to declare a package.
The “import” keyword is used to import package in a class.
Example -
// calc.java // web design house //online promotion house
|
//Save file with - Calc.java |