What is the difference between the following two statements.

  1. import pack.Addition;
  2. import pack.*;

In statement 1, only the Addition class of the package pack is imported into the program and in statement 2, all the classes and interfaces of the package pack are available to the program. If a programmer wants to import only one class of a package say BufferedReader of java.io package, we can write import java.io.BufferedReader;