• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

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: 39435
768
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: 39435
768
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).
 
Police line, do not cross. Well, this tiny ad can go through:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!