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.*;
import java.util.Vector;


Rating:



Other articles

Click here to Article home

MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD, SCJA, SCBCD, SCMAD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.
 
HACKER SAFE certified sites prevent over 99.9% of hacker crime.