+ 1
Define package ?
2 Réponses
+ 1
A java package is a group of similar types of classes, interfaces and sub-packages.
Package in java can be categorized in two form, built-in package and user-defined package.
There are many built-in packages such as java, lang, awt, javax, swing, net, io, util, sql etc.
example:
import java.util.Scanner.*;
the above example have a keyword import which will import the classes and interface that we specify.
here util is built-package with in that we have Scanner class.
This scanner for reading input from user dynamically.
Scanner sc= new Scanner(System.in);
String name=sc.next();
which will read input name.
0
package name; will do that