• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

correction in book- oca java se 8 programmer i study guide exam 1z0-808

 
nilesh padmagiriwar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

there is need one correction for :-
book - oca java se 8 programmer i study guide exam 1z0-808
chapter - 4
page number - 188

given in book --
"The compiler will complain if you try to explicitly do a static import of
two methods with the same name or two static variables with the same name. For example:
import static statics.A.TYPE;
import static statics.B.TYPE; // DOES NOT COMPILE "

it should be --
You can  explicitly do a static import of two methods with the same name or two static variables with the same name.
But when you try to use that static method/variable, it gives compiler error .
for example -


Thanks,
Nilesh
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right. The intent there was to show the line that caused the class not to compile. Rather than say that line had an actual compile error on it.

We probably should have written "incorrect" or the like.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic