In Java, there are two valid forms of the import declaration:
import java.lang.Math;import java.lang.Math.*;
In the latter, a wildcard is used. This form is known as a Type-Import-on-Demand declaration, but how is it different from the former? Does it also import the subpackages of java.lang.Math?
What if Math were a Type (e.g., a class)—would all of its inner classes be imported?
Only immediately-nested types are imported. The declaration is not recursive.
This does work with types for importing inner classes.This also works with static import (for importing methods).