Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Sybex Java OCA/OCP PRACTICE TESTS 8 typo ch2 mock answer 44

 
Ranch Foreman
Posts: 98
5
  • 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
 
Saloon Keeper
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: 40912
840
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