Section E.16. import

   

E.16 import

The import command allows you to reference a class in the imported package only by its class name . For instance, the package java.lang.String is the complete package name for the String class. Since java.lang is always imported automatically, we are free to refer to a string without using the package name.

To import all of the classes in a package, use a wildcard:

 import java.sql.*;  // now you can refer to any class in the java.sql package by // class name only: Statement stmt = con.createStatement(); class myClass {     void make } 

   
Top


Java for ColdFusion Developers
Java for ColdFusion Developers
ISBN: 0130461806
EAN: 2147483647
Year: 2005
Pages: 206
Authors: Eben Hewitt

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net