What is the import statement?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
What is the import statement?
Rating:
The import statement is a compilation unit that is used to bring a specified class, or an entire package, into the visibility of a source file. The import statement is an optional part of a source file. If the import statements appear in a source file, they must be placed before any class declaration.
To import a single class, its fully qualified name is used after the import keyword. However, to import the entire package, the wildcard character * (asterisk) is used after the end of the package name. This is shown as given below:
import java.util.Vector;
Rating:
Was this information helpful?
Other articles
- What is a MIDlet?
- What is the List interface?
- What is JMS ?
- What is the floatValue() method?
- New features in Java certification exam.
