Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passed OCPJP8 (1Z0-808) with 94%

 
Yukio Fukuzawa
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I created this account solely for the purpose of bragging about this. I was surprised at first with the high score, because I studied on the K&B book and never got more than 70% for the mock exams provided on sybex. In my opinion the mock exam questions are way too tricky - that might help you but that made me quite paranoid about having something not compiled.
I wasn't certain about 8 questions but upon looking them up I found that I answered wrongly only one of them. So there are 3 wrong answers unaccounted for.
Anyway, I'm pretty proud of the result.
Here are the topics that I wasn't certain about during the exam, in case you're interested:

1. baseClassInstance.protectedMethod() cannot be called from DerivedClass unless the DerivedClass is in the same package. However calling derivedClassInstance.protectedMethod() is perfectly legal.
2. Cannot call super() and this() at the same time.
3. A variable can be hidden by another variable with the same name, even if they're of different types. This is perfectly legal:

int a;
{
double a;
}

4. LocalDate.toString() prints out in ISO format (YYYY-MM-DD)
5. new Boolean(null) gives you a Boolean.FALSE
6. ["1", "2", "3", "2"].remove("2") will only remove the first "2" in the list. Result is ["1", "3", "2"]
7. StringBuilder.subString(String, beginIndex, endIndex) exists!
8. catch (Exception e) does not catch Error !
 
Puspender Tanwar
Ranch Hand
Posts: 395
2
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you have written the wrong name of exam. The name is OCAJP8
 
Yukio Fukuzawa
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Opps, can someone helps me change the title please?
 
Puspender Tanwar
Ranch Hand
Posts: 395
2
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and congrats on such a good score and welcome to coderanch
now your questions:
1. protected methods depend upon the inheritance, they can b called from the current package and from the other package(but that class must extends the class having that protected method)
2. their is a rule for super() and this(): either super or this must be the first statement . but unfortunately two statements cannot be at the first at a time, that's why it is not legal
3. true
5.default value of boolean variable is False.
6. i think it correct
7. no there is no such static method
8. true. catch(Throwable t) can catch both error and exception
 
Yukio Fukuzawa
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Puspender Tanwar wrote:and congrats on such a good score and welcome to coderanch
now your questions:
1. protected methods depend upon the inheritance, they can b called from the current package and from the other package(but that class must extends the class having that protected method)
2. their is a rule for super() and this(): either super or this must be the first statement . but unfortunately two statements cannot be at the first at a time, that's why it is not legal
3. true
5.default value of boolean variable is False.
6. i think it correct
7. no there is no such static method
8. true. catch(Throwable t) can catch both error and exception

Thanks, those are not my questions, those are the points that I missed during the exams.
7. I don't refer to the static method - I meant the method subString() that is available for StringBuilder
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic