In-exam hints

These hints are relevant to when you are actually taking the exam.

Approach to questions

  • Read the question carefully - most of the time when I got a question wrong on a mock exam it was due to rushing my response before carefully reading what the question was actually asking.
  • What the question seems to ask may not really be so - apparently, the exam authors are fond of 'trick' questions which may lead you astray. You may wonder why they do this? Unfortunately, I haven't found a valid justification.
  • Review Assumptions for the exam (bottom of the page; the same assumptions for OCAJP an OCPJP)
  • Review Common question types to better know what to expect
  • If code has no line numbers, or starts at line 1, check for import statements. Otherwise, assume the imports have been made correctly.
  • Check compile error options first, because it can save time working out the rest of the question
  • For garbage collection questions, draw lines going from references on the left to objects on the right. Change these lines as the code listing progresses.
  • When a question has code that adds objects at indexed positions, draw it so that you won’t lose track of which value is at which index.


Structure of working out

  • Draw line down the center of the page (assuming A4 page)
  • First, write down the question number.
  • Second, write a line with "a b c d e f" at the top. As you rule out answer, cross them out with a single stroke. Some questions will require multiple answers, in which case (circle) the valid options.
  • If a question has line numbers, use those in the working out.
    • On each line, list the value of the variables for each code of line. to save time, after listing a variable once, only list it again if the value changes.
    • Alternatively, if there are System.out.println() in the code list, write down the output of these.
  • If a question doesn't have line numbers, add your own, starting a 1
  • If a question has a loop, add extra lines to working out for each iteration. Use the index value for numbering the working out. If you already have line numbers, use dot notation (see below).
  • Draw a line under your working out for the question

(a) b c d e f
5: x =3, y =4
6: x = 10

8.0 x = 5, y = 5 (loop iteration 1)
8.1 x = 6, y = 4 (loop iteration 2)


Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License