• 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

Coding for the SCJP certification

 
Ranch Hand
Posts: 151
1
Eclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I want to prepare for SCJP but I don't know how to practice coding for the exam. Could you please help me by guiding me on how to code for the exam? What should I code? Where to get the ideas from for coding? I will be grateful.

Kind Regards
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well if you have mock exams, you can use those code snippets to verify the answer choices and eventually reinforce whatever concept that question is asking.
WARNING: using this approach isn't good because you tend to have memorized/recognized the question by the time you take the exam.

Another approach is simply to create some random programs/classes to test say access modifiers. Changing the modifier from public to protected or package default, will the code compile? If compile success, will there be runtime exception (eg failed to call method)?

Say for exception handling, the rule is that the subclass must be caught before the parent class (eg catch FileNotFoundException then IOException). Changing the order will give you compile error. Verify it.

With Java 7, multiple exceptions can be caught on a single line. Will the order make a difference? Can the exceptions list have a subclass and its parent class?

Depending on what topic you are studying, you can create many small programs to test each area. Imagination and creativity will help you think of programs to learn.

Good luck.
 
Abhimanyu Jain
Ranch Hand
Posts: 151
1
Eclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you sir!!
 
reply
    Bookmark Topic Watch Topic
  • New Topic