• Post Reply Bookmark Topic Watch Topic
  • New Topic

Errata for OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide - page 221  RSS feed

 
Eric Drijver
Greenhorn
Posts: 3
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Chapter 3 on page 121 in table 3.3
It says that this method:

compiles, but it doesn't with java version 1.8.0_144
 
Campbell Ritchie
Marshal
Posts: 56221
171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

I can't see what the error is; please post the error message you got. Please also post the code you wrote exactly as you wrote it.
 
Eric Drijver
Greenhorn
Posts: 3
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


and the error:

 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16047
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, the method indeed compiles. There's nothing wrong with the method itself (lines 9-11).

What doesn't compile, is trying to call the method with a List<String> (in line 17 of your last piece of code).
 
Eric Drijver
Greenhorn
Posts: 3
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, I get it now!

As you state: the METHOD does compile!

so there is no errata here!
The code did not, so I thought, this is wrong, it doesn't compile!
Sometimes what I read does not register with me.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!