Computer Applications

Explain the use of import statement with an example.

Input in Java

68 Likes

Answer

import statement is used to import built-in and user-defined packages and classes into our Java program. For example, we can import all the classes present in the java.util package into our program using the below statement:

import java.util.*;

Answered By

45 Likes


Related Questions