import java.*;
Why cannot I do this importing ?? Instead of importing the all class in a particular sub-package of the package \'java\' , I tried t
There is no such thing as sub-package in java.
java.util.stream
is not a sub-pacakge of java.util
.
Therefore import java.util.*
doesn't import the classes of java.util.stream
.
To import all the built in classes, you have to import them one package at a time. It's a better practice, though, to only import the classes that you actually need.