• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Sybex Java OCA 8 Online Bonus Test Typo Question 69 of 180

 
Ranch Hand
Posts: 133
6
  • 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: 41093
848
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!
 
Yeah. What he said. Totally. Wait. What? Sorry, I was looking at this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic