Prepare the exam
Aus wiki
Inhaltsverzeichnis
Prepare the Exam
common tips to determine if code compiles
- Keep an eye out for all reserved words Chapter 1
- Verify brackets - {} - and parentheses-()- are being used correctly.Chapter 1
- Verify new is used appropriately for creating objects Chapter 1
- Ignore all line indentation especially with if-then statements that do not use brackters[]. Chapter 2
- Make sure operators use compatible data types, such as the logical complement operator(!) only applied to boolean values, and arithmetic operators (+,-,++,--) only applied to numeric values Chapter 2
- For any numeric operators, check for autimatic numeric promotion and order or operation when evaluating an expression Chapter 2
- Verify switch statements use acceptable data types Chapter 2
- Remember == is not the same as equals(). Chapter 3
- String values are immutable Chapter 3
- Non-void methods must return a value that matches or is a subclass of the return type ot the method Chapter 4
- If two classes are involved, make sure access modifies allow proper access of variables and methods Chapter 4
- Nonstatic methods and variables require an object instance to access Chapter 4
- If a class is missing a default no-argument constructor or the provided constructors do not explicitly call super(), assume the compiler will automatically insert them Chapter 5
- Make sure abstract methods do not define an implementation, and likewise concrete methods always define an implementation Chapter 5
- You implement an interface and extend a class Chapter 5
- A class can be cast to a reference of any superclass it inherits from or interface its implements Chapter 5
- Checked exceptions must be caught, unchecked exceptions may be caught but do not nedd to be Chapter 6
- try blocks require a catch and/or finally block for the OCA exam Chapter 6
Tips during taking the test
- Answer all Questions-> Guess an answer
- Understand relationship between answers
- check for answers do not compile due to line x
- have a look at the starting linenumber, maybe includes are needed for complie, if it starts with 1...
- skip hard questions and mark it for "review"
Optimizing your time
- 120 min remaining start the exam
- 90 min remaining 1/3 finished
- 60 min remaining 2/3 finished
- 30 min remaining fist pass pf all questions complete
- 5 min finished questions which were marked for "review"
(for example 2h and 90 questions)