• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Exam trickery?

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm wondering about the level of trickery that takes place on the SCJP 5.0 exam. I am using the K&B SCJP 5 Study Guide. Can someone (hopefully one of the exam writers) tell me whether the exam would ever do something like this (as the book does)?

Given the following class and interface declarations (from the Exam Watch section, Ch 2, p. 121):

...
interface Fi { }
interface Fee implements Baz { }
...

Which of these are legal declarations:

...
class Zoom implements Fi, Fee { }

interface Vroom extends Fi, Fee { }
...

In the book, it says that the latter two declarations are legal, but since the Fee interface declaration is not a legal declaration, the latter two declarations are not technically legal. I understand that the book is just trying to show multiple implements and extends, however, I would like to know whether the exam would ever pose a question like this without the context of the answer being made clear.

Thanks.
-Mark

[ November 13, 2006: Message edited by: Mark Allenb ]
[ November 13, 2006: Message edited by: Mark Allenb ]
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've never taken the SCJP exam, however yesterday I took (and passed) the SCJA exam. There were several tricky scenarios such as that on the exam, when given code snippets to determine the outcome. It can be confusing when they are demonstrating polymorphism, and it is essential to understand that interfaces can only EXTEND other interfaces, and that they can extend multiple interfaces. Whereas classes can only extend a single class, but they can implement multiple interfaces. So in summation, I'm pretty sure they'd try to trip you up with stuff like that on the SCJP exam as well.
 
author
Posts: 9050
21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mark,

Actually, we updated page 121 so that Zoom and Vroom work with Fi and Baz.

In general, on the real exam and on good mocks, you should consider that any code you can see should be considered a part of the question. If some code doesn't match up with some other code in the same question take that as a clue!

hth,

Bert
 
Mark Allenb
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bert, sorry I'm not sure I understand your answer. Are you saying that the exam will not try to trick you using invalid declarations, as in the book?

Also, when you said you revised p. 121, are you saying that there is a newer revision of the book? I just recently bought the book and thought I got the latest revision. I did not see anything about p. 121 in the errata.

Thanks.
 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think Bert is saying that there won't invalid declarations on the exam.

I don't think the book was purposefully trying to be tricky on p. 121. It clearly states that:
interface Fee implements Baz {} // is incorrect

Later it has an example:
interface Vroom extends Fi, Fee {} // and says this is OK

The books intent is to say that it is OK to have an interface (Vroom) extend 2 or more interfaces (Fi, Fee) as long as they are separated by commas.

Unfortunately this last statement used Fee as one of the interface names. This causes confusion because Fee was not a valid statement above. Bert is saying that instead it should say:
interface Vroom extends Fi, Baz{} // this is OK

This removes the confusion, because Fi and Baz were both properly declared earlier on the page. I hope this clears up the confusion.
 
Bert Bates
author
Posts: 9050
21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
there might be invalid declarations - watch out!
 
Mark Allenb
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
F Fountain: Ok, that's what I was hoping Bert was saying. I'm going with that. I'll just hope that the exam doesn't use the same method that the book used to make the point it was trying to make. I fully understood that point, just thought it was a poor way to make it. Sounds like the authors recognized that too.

Bert: I think we all realize that the exam will contain invalid declarations. But, since I haven't gotten a recognizably definitive answer to my question from you, I'm going to just assume that the method used in the book (for this specific example) will not be used on the exam.

Thanks.

(NOTE: No real horses were beaten to death during this thread discussion. ;-)
 
Bert Bates
author
Posts: 9050
21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Mark,

Glad to hear about the horses!

Sorry if I wasn't clear. I think the book wasn't clear, and so it will be changed as I indicated earlier in this thread. On the real exam, all the code you see in a question will relate, so if you find an error in one place that error will affect the answer to the entire question.

does that make sense?
 
Mark Allenb
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bert,

Yes! That is the kind of answer I was looking for and it makes sense!

Thanks much for your patience and taking the time to answer my question.

-Mark
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic