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

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
Username987654
Posts: 95
Joined: Sat Dec 26, 2015 6:37 pm
Contact:

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

Post 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?

admin
Site Admin
Posts: 10396
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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).

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 9 guests