Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Monday, November 19, 2007

java Packages within packages require additional imports

The import statement gives access to classes in a package, but not to packages in that package. For example,

import java.util.*;

does not give access to the classes of the package java.util.regex. To access classes in java.util and java.util.regex, import both.

import java.util.*;
import java.util.regex.*;

No comments:

Post a Comment

Archives