Java   View all facts   Glossary   Help
syntactic unit > declaration > import statement
Next declarationinterface declaration    Updeclaration, statement    Previous declarationclass declaration   

import statement
(import declaration)
subjectfact 
import statementis a synonym of import declaration2001-10-19 11:36:53.0
has definition A statement that permits using references to other packages without prefixesadded by: DS, source: Sun Java Tutorial, reference: Source 2, 2001-10-19 11:36:53.0
has example
//Import the Circle class from the graphics package
import graphics.Circle;

//Import the entire graphics package
import graphics.*;
added by: JK, source: Sun Java Tutorial, 2001-10-19 11:36:53.0
has purpose to allow a class to use the facilities of another package    source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:36:53.0
has syntax
import packageName.*
OR
import packageName.className
added by: JK, source: Sun Java Tutorial, 2001-10-19 11:36:53.0
imports 1 member class of a package or imports on demand 0 or more member classes from a packageadded by: JK, source: Sun Java Tutorial, modified by: WH, comment: a class is imported on demand if its short name is used and no other class with the same short name is imported explicitly, 2001-10-19 11:36:54.0
is a subtopic of Packages2001-10-19 11:36:54.0
is located added by: Marvin, modified by: JK, 2001-10-19 11:36:54.0
is a kind of declarationadded by: DS, 2001-10-19 11:36:54.0
is a kind of statement    source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:36:54.0
declarationis part of definition2001-10-19 11:36:35.0
statementis terminated by a semicolon    2001-10-19 11:37:57.0
should be not more than one line long if possible2001-10-19 11:37:57.0
syntactic unithas syntax rule
bold = mandatory
italic = non-terminal
normal font = optional
2001-10-19 11:38:04.0