• 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 8 Online Bonus Test Typo Question 69 of 180

 
Ranch Hand
Posts: 215
11
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
String tiger = "Tiger";
       String lion = "Lion";
       final String statement = 250 > 338 ? lion : tiger = " is Bigger";
       System.out.println(statement);

F.The code does not compile; because the assignment operator has the highest order of precedence in this expression.

It should be "ternary operator has the highest order of precedence in this expression". instead of "assignment operator has the highest order of precedence in this expression".

by alinvlad05

 
author & internet detective
Posts: 41860
908
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 to the errata for both the OCA 8 *and* the Java 11 exam. Good eye!
reply
    Bookmark Topic Watch Topic
  • New Topic