• 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 Java OCA/OCP PRACTICE TESTS 8 typo ch2 mock answer 44

 
Ranch Hand
Posts: 215
11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sybex Java OCA/OCP PRACTICE TESTS 8 typo ch2 mock answer 44

p[beakLength]=b;

In Java, braces are for arrays rather than instance variables.


It should be Brackets [] instead of Braces {}

by alinvlad05
 
Bartender
Posts: 1737
63
Eclipse IDE Postgres Database C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are terminology problems with the names for these characters when working internationally, which I often do.

Oracle and its exams (and our authors) generally use the terms as I used them growing up:

( parentheses )
[ brackets or square brackets ]
{ braces or curly braces }

people from other parts of the world use different names for these, caution is warranted when reading code aloud on global projects.

I agree that in the old Java 8 prep book it would seem they used the wrong term -- I hadn't seen that occur anywhere in the Java 11 books.
 
author & internet detective
Posts: 41907
909
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
Yes. We were sloppy about brackets vs braces in our first book
reply
    Bookmark Topic Watch Topic
  • New Topic