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

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

 
Ranch Hand
Posts: 216
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: 42074
933
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!
 
Let's get him boys! We'll make him read this tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic