Hi!
In my program, the two first line are:
My question is why I must write it like this?Quote:
import java.awt.*;
import java.awt.event.*;
If import java.awt.* - let me get everything from awt so In my opinion I don't need line java.awt.event.*
Printable View
Hi!
In my program, the two first line are:
My question is why I must write it like this?Quote:
import java.awt.*;
import java.awt.event.*;
If import java.awt.* - let me get everything from awt so In my opinion I don't need line java.awt.event.*
The wild card, * sign, only allow to import/use the classes in this package visible, not any of the sub-packages.
java.awt.* only imports classes from the java.awt package and not classes from packages under it.
Hi,
event is a subpackage here.nothing but subfolder...
awt is a parent package nothing but main folder here...