Home / Questions / (ii) What is the use of the keyword import?
Explanatory Question

(ii) What is the use of the keyword import?

👁 87 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

The import keyword is used in Java to include the classes and interfaces from other packages so that they can be used in the current program. This allows the programmer to access the standard library classes or classes from user-defined packages without needing to use their fully qualified names.