Java: Importing resources, the use of "*"?

I am currently working on a tutorial that uses the following imports:

//importing Resources
import java.awt.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import javax.swing.*;

My question is: does java.awt.* import everything from awt? And if so why is this necessary?

 import java.awt.event.ItemEvent; 
Jon Skeet
people
quotationmark

My question is: does java.awt.* import everything from awt?

It imports all the classes in java.awt, but that's all.

And if so why is this necessary?

import java.awt.event.ItemEvent; 

Because that's not in java.awt - it's in java.awt.event. Packages in Java aren't really hierarchical, even though they look that way. As far as the Java language is concerned, java.awt and java.awt.event are entirely separate packages.

people

See more on this question at Stackoverflow