• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Wrong Answer for random question, online exam #2 (Java OCA 8 Programmer I Study Guide)

 
Greenhorn
Posts: 21
IntelliJ IDE Oracle Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the writers have forgotten the new line character on this one.
As is, "7:" is written as a java label, but whose name is an invalid identifier (not alphanumeric, neither starting with $ or _). As is the code doesn't compile.

Please add a newline between line 6 and 7, or accept "G" as the correct answer.

 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Saad Benbouzid wrote:As is, "7:" is written as a java label, but whose name is an invalid identifier (not alphanumeric, neither starting with $ or _). As is the code doesn't compile.

Please add a newline between line 6 and 7, or accept "G" as the correct answer.


Obviously something went wrong in the "Transform author question to online question" process: a new line character should be added before 7: (and answer E is still the correct answer for this question).

Hope it helps!
Kind regards,
Roel
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Roel. The answer is correct, but need a needline.
 
author & internet detective
Posts: 40212
816
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, thank you for pointing out the missing new line. I'll work with the publisher to get it corrected.

My manuscript says this is in exam #2, not #3 by the way.
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:My manuscript says this is in exam #2, not #3 by the way.


Then the publisher made another mistake, because it's definitely in exam #2 (I just took exam #2 in fast-forward mode ).
 
Jeanne Boyarsky
author & internet detective
Posts: 40212
816
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, it was probably a typo at Saad's end. This thread had online exam #3 in the title. (I just edited it to #2).
 
this is supposed to be a surprise, but it smells like a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic