• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Seeking Exam Advise

 
Ranch Hand
Posts: 30
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have been preparing for the OCPJP exam for the past 3 months. I have scheduled my exam (its within one week from now) but I am really worried I have followed SCJP Preparation book by K&B and I believe I understood the basic concepts underlined in the book.

I am taking the simulated exams from ExamLab and the score is really poor I have also followed the OCP Exam Preparation and there as well the score is just the same 50% only

Please advise.

Thanks
 
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kaur Manpreet,

There's a dedicated forum for SCJP preperation/doubts etc. You will get better help there.

Also, it would helpful if you provided further details like in which areas you are scoring low? or what type of problems?

It is very important to understand exact type of problem in SCJP/OCP. e.g. a code snippet with couple of synchronized blocks might fail due to absence of a semicolon etc.

All the best.
 
Marshal
Posts: 80619
469
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Anayonkar Shivalkar wrote: . . . There's a dedicated forum for SCJP preperation/doubts etc. You will get better help there. . . .

Agree. I shall move this discussion thither.
 
Kaur Manpreet
Ranch Hand
Posts: 30
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My weaknes is that I forget things too quickly... I can understand them well ... write programs with no problem.... I have practiced mainly on IDE... I have recently started practicising several programs without the help of IDE and there seem to be several exceptions and errors that I encountered and understood during that time.

Especially on the formatting and exceptions, I get confused when its time to decide between compile time error or run time exception

But thankyou all, I will refer to the appropriate forum
 
Campbell Ritchie
Marshal
Posts: 80619
469
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is probably not a good idea to practise on IDEs; they are intended for rapid development, not for learning. It is only practice that will enable you to remember things.
I don’t understand what you said about exceptions and compile-time errors.
 
Kaur Manpreet
Ranch Hand
Posts: 30
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am actually bad at anwering questions when there are two options compile time error or exception would be thrown at runtime.

I get confused as to when would this be reported. I had a tough time understanding the ClassCastException thrown at runtime and inconvertible types compile time error.
Thanks

 
Anayonkar Shivalkar
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kaur Manpreet wrote:I had a tough time understanding the ClassCastException thrown at runtime and inconvertible types compile time error.


Well, it is not much difficult to identify if you understand inheritance hierarchy.

Inconvertible compile time error occurs when compiler knows for sure that type of the references are not convertible at all. ClassCastException occurs when casting of references is possible, but at runtime, actual objects are not convertible.
e.g.

This happens because, at line 7, compiler knows that d is a reference of type Dog, and there's no way that it can refer to a Cat object, so, at compile time itself, there is an inconvertible type error.
But at line 9, animal is a reference of type Animal, and there is a chance that it can refer to either Animal, Cat or Dog object. So, compiler doesn't complain about this casting. But at runtime, animal is actually referring to a Cat object, which cannot be converted to Dog object(or, to be specific, a reference of type Dog cannot refer to Cat object), and hence, there is a ClassCastException.

I hope this helps.
reply
    Bookmark Topic Watch Topic
  • New Topic