Provide Best Programming Tutorials

Import Statements In Java

Import statements in Java

Import is a keyword in java language used to import the predefined properties of java API into current working java program.


import package1.package2.......*;

Used to import all the predefined properties of given package.


import pack1.package2.............Class_Name/Interface_Name;

Used to import specific class or interface in a java program.

Java API is a collection of package, package is a container which is collection of predefined classes and interfaces.

Note: Import statement should be the first statement of the java programs.

Leave a Reply

Close Menu