Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Import Statement in Java

807600Oct 1 2007 — edited Oct 2 2007
I have one question about import of packages and classes. If I import java.awt.** why can't all the packages starting with java.awt get imported.For example java.awt.color.* or java.awt.font doesn't get imported. I didn't get why so and if so then why these classes were prefixed with java.awt. Same case happened to me when I imported java.util.* and didn't find java.util.concurrent.locks.Lock get imported. There must be some reason behind this. But I don't know. Can anyone please let me know ?


--Prasad

Edited by: Prasad_Kumbhare on Oct 1, 2007 7:55 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 30 2007
Added on Oct 1 2007
7 comments
268 views