• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mock 3 exam confusing question (Java OCA 8 Programmer I Study Guide)

 
Vincent Botteman
Greenhorn
Posts: 9
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of the question is

In which order can you assemble the following statements in to make a valid Java program? (Choose all that apply)
A. /* Hello World */
B. ArrayList list;
...


What is the purpose of this question as you can not specify any order of the elements?
I selected answers A,D,E,F because together and in that order they make a valid Java program. But the correct answer is different and I don't understand the explanation.

Maybe the question was supposed to be something like this?

1: /* Hello World */
2: ArrayList list;
...

Possible answers:
A: 1,3,4,2,6,5
B: 4,1,3,5,2,6
...
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vince Botteman wrote:What is the purpose of this question as you can not specify any order of the elements?
I selected answers A,D,E,F because together and in that order they make a valid Java program. But the correct answer is different and I don't understand the explanation.

I completely agree with you! This question makes no sense at all! Probably something seriously went wrong when this question was converted from the authors' notes to the interactive online test bank.

You would indeed expect to have a set of code fragments, each of them having a unique number. Then each possible answer is just a series of those numbers indicating the order of the code fragments.

And I'll add an additional remark as well: because the question asks for a valid Java program, one of the code fragments should be a closing curly brace as well (to close the class declaration). Otherwise none of the assembled programs will compile successfully.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We reported that to the publisher yesterday. As you might imagine, that was not the original question. Something clearly went wrong between what we submitted and the "Transforming to online question" process.

Vince: I sent you a PM with what the question was supposed to be.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic