Page 1 of 1

[HD Pg 43, Sec. 2.4.1 - the-import-static-statement]

Posted: Tue Dec 17, 2019 12:49 am
by Username987654
There are a number of statements such as the following:
java.lang package is imported automatically in all the classes.
Would it be more correct to say (as is used at times) java.lang.* (packaged) classes are imported automatically? Packages are never imported? Only class names inside those packages?

Re: [HD Pg 43, Sec. 2.4.1 - the-import-static-statement]

Posted: Tue Dec 17, 2019 1:34 am
by admin
It would be splitting hair because importing a package is a fairly common way of saying importing all classes of that package. Also, an even more technically precise statement would use "type" i.e. all "types" are imported (not just classes).