This week's book giveaway is in the Artificial Intelligence forum.
We're giving away four copies of Pragmatic AI and have Noah Gift on-line!
See this thread for details.
Win a copy of Pragmatic AI this week in the Artificial Intelligence forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

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

 
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
 
Marshal
Posts: 59797
188
  • 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:

 
Java Cowboy
Sheriff
Posts: 16084
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!