+ 3
Can't we import whole package rather than importing each classess?
that is using import java.util.*; rather than import java.util.Iterator; import java.util.LinkedList; Are we making the program more complex when we import the whole package?
1 Antwort
+ 13
The program will not be more complex and not even bigger. The import declaration just tells the compiler: If you don't find a class in this package, search for them at the path that is declared after import.