aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes do these type of questions really come in exam ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "do these type of questions really come in exam ?" Watch "do these type of questions really come in exam ?" New topic
Author

do these type of questions really come in exam ?

Surender Suri
Ranch Hand

Joined: May 28, 2010
Posts: 42
Do these type of questions really appear on real exam ? this question is from K&B mock exam.. i have seen couple of then in K&B mocks and i did wrong most of the time :-( .. i don't know what they are trying to test here .. my observation skills ? it's more like an eye test :-)

since most of you are certified .. did any one seen these type of question in real exam ?



What is the result?
A. 1 1 1
B. 2 0 1
C. 2 0 2
D. 2 2 2
E. Compilation fails.
F. An exception is thrown at runtime.

E is correct. We had to throw at least one of these in here, sorry. The reverse() and sort() methods are in the Collections class, not the Collection class—ouch. Again, look for this kind of misdirection in the real exam! If the invocations had been Collections.reverse(desk) and Collections.sort(desk), the result would have been 2 0 1—remember, indexes are zero-based.

Thanks,
Suri
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8829
    
    5
well we did apologize ;)


Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Surender Suri
Ranch Hand

Joined: May 28, 2010
Posts: 42
hope they don't appear on exam though :-) .. anyway thanks bert for the amazing book
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11411
    
  16

If you mean "Do they ask questions where the correct answer is "compilation fails", the answer is "Yes, at least when I took it".


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8829
    
    5
Frank, your answer won't compile (wouldn't pass a lint test)

More seriously, the exam creators aren't trying to be tricky - they're trying to test for common errors. In the old days the exams were meant to be tricky, lately we've moved away from such a tricky approach. For example, don't memorize API details, but DO know that parseXXX() methods tend to throw exceptions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: do these type of questions really come in exam ?