• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can't understand mock 3 exam question (Java OCA 8 Programmer I Study Guide)

 
Fábio Canelo
Greenhorn
Posts: 6
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

I'm planning on taking the 1Z0-808 certification next week and I'm using Jeanne Boyarsky and Scott Selikoff book as well the mock exams. Very helpfull!

However, I came across a question which I have no clue what it's asking. English is not my first language, maybe that could explain why I do not understand the question. Furthermore it's asking "in which order" and there's no way you can specify an order in such exercice.

The questions is in the attachment.
I appreciate all your help and feedback.
Thank you.

Fábio.

oca_8.png
[Thumbnail for oca_8.png]
oca 8
 
Matthew Brown
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Fábio. Welcome to the Ranch!

Where did you see that question? There are certainly a few issues with it.

What is seems to be asking is for you to rearrange the lines of a source file so that it forms valid Java, and so it would compile. But...

- As you say, you can't specify an order. My guess is that they've taken a question that was supposed to have a different user-interface - e.g. a drag and drop question - and stuck it into a different format without thinking about it.

- It isn't possible anyway. That '{' in statement E? There's no matching '}' in any of the other lines, so you can't close the class declaration.

- Ignoring that, the answer still isn't unique - e.g. you can put the comment line anywhere you want.
 
Ganish Patil
Ranch Hand
Posts: 529
19
Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Netbeans IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of the valid answers can be D, C, E, A, B, F. Because of comment tag you can change the order, you can put the comment anywhere in code so that could change order. Even " ArrayList list;" can be an instance variable i.e. Field which is declared after " public class Builder{" OR local variable of " public void method() {} " which is declared inside this method.
Welcome to CodeRanch !
 
Fábio Canelo
Greenhorn
Posts: 6
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Matthew Brown!

Thanks for the reply!!
We both share the same opinion, something's wrong with this question.
This question is in the mock exams that can be accessed when you buy OCA: Oracle Certified Associate Java SE 8 Programmer I Study Guide Exam 1Z0-808 from Jeanne Boyarsky and Scott Selikoff.

I've attached the proposed answer. Anyway, the answer does not make much sense and it really seems that this question is not well structured, something is missing.
I'll probably just move on and ignore this question.

Fábio.
oca_8_answer.png
[Thumbnail for oca_8_answer.png]
Answer
 
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
Hi Fábio Canelo,

First of all, a warm welcome to CodeRanch!

Fábio Canelo wrote:However, I came across a question which I have no clue what it's asking. English is not my first language, maybe that could explain why I do not understand the question. Furthermore it's asking "in which order" and there's no way you can specify an order in such exercice.

Nothing wrong with your English It's already discussed/reported in this topic. Something went wrong in the "Transform author question to online question" process.

Hope it helps!
Kind regards,
Roel
 
Fábio Canelo
Greenhorn
Posts: 6
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Roel!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic