• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Sybex OCP Java 8 Study Guide: Generics section

 
Greenhorn
Posts: 15
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

first post : )

In Sybex OCP Java 8 Study Guide Chapter 3 Generics, section Working with Generics it presents the bounded parameter type and wildcard generic type but it only explains wildcards; it fails to mention that bounded parameter types can extend multiple classes and interfaces (1 class - n interfaces) and the fact that their bounds don't make the collections read-only (https://docs.oracle.com/javase/tutorial/java/generics/bounded.html).

Feel like that could be improved in a future version.
 
author & internet detective
Posts: 41855
904
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mike,
Welcome to CodeRanch!

That isn't included in the book because it isn't on the exam. A study guide isn't going to cover everything there is to say on a topic. And generics is plenty big and complicated already!
 
Mike Constantin
Greenhorn
Posts: 15
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
D'ouh! Thanks for letting me know.
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As Jeanne pointed out, we focused the study guide on preparing you for the exam. If we tried to include every possible topic, it would easily be a 2,000+ page book! (streams can get complicated!) That said, we tried to add a side bar when we found something interesting that we thought added value, even if it wasn't strictly on the exam.
 
Mike Constantin
Greenhorn
Posts: 15
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think it is the wording that got me confused:

"A bounded parameter type is a generic type that specifies a bound for the generic. Be warned that this is the hardest section in the chapter, so don’t feel bad if you have to read it more than once."

It says "hardest section in the chapter" but then there is no section at all.
 
Jeanne Boyarsky
author & internet detective
Posts: 41855
904
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mike Constantin wrote:It says "hardest section in the chapter" but then there is no section at all.


For what it's worth, that hardest section comment refers to the entire bounds section from page 117-122.
 
Scott Selikoff
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Generics and streams are topics that can be difficult because so much is built on top of each other. For example, you have to understand basic generics well before you can understand wildcards. Likewise, you need to be pretty skilled with lambdas and basic streams before jumping into more complex methods like groupingBy() and primitive streams.

For sections like this, we tried to ease you into the more complex topics one step at a time, gradually building on the preceding text. As we comment in the book though, some topics are so complex we recommend reading the chapter twice, as you are likely to get more out of it the second time!
reply
    Bookmark Topic Watch Topic
  • New Topic