💦 FULL SET: T//certification/Sybex Java OCP Study Guide - Full Archive

  • 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:
  • Devaka Cooray
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

Sybex Java OCP 8 Study Guide small typo Chapter 3 page 162 553

 
Ranch Hand
Posts: 216
11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sybex Java OCP 8 Study Guide small typo Chapter 3 page 162 , answer on 553
Review Question 3 answer

3:    List list = new ArrayList();
4:    list.add("one");
5:    list.add("two");
6:    list.add(7);
7:    for (String s: list)
8:    System.out.print(s);

Lines 3 through 7 create an ArrayList without generics.

It should be Lines 3 through 6 create an ArrayList without generics.
 
author & internet detective
Posts: 42204
937
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
Confirmed and added the errata.

I also checked our Java 11 book. We changed that question significantly so the error doesn't apply there.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic