SKILL BENCHMARK

Java Object-Oriented Programming Competency

  • 27m
  • 27 questions
The Java Object-Oriented Programming Competency benchmark measures your ability to invoke member functions, access static members, structure code using try-catch-finally blocks, define how catch blocks intercept and handle exceptions, and use the throws keyword to declare uncaught exceptions. A learner who scores high on this benchmark demonstrates they have the skills to implement exception handling, as well as work with member functions and streams in Java.

Topics covered

  • apply the methods of the Exception base class to obtain exception information
  • appropriately override the .toString method provided by the Object base class
  • avoid pitfalls related to re-initialization and modification of objects (reference types) while invoking functions in Java
  • combine multiple independent catch blocks using the | operator
  • combine multiple related catch blocks using the | operator
  • correctly chain constructors to achieve code reuse
  • correctly declare or handle exceptions in a chain of functions, each of which throws different types of exceptions
  • correctly initialize objects of inner classes
  • correctly initialize objects of static nested classes
  • correctly invoke a method that throws an exception of a checked exception type
  • correctly place the finally block relative to the catch blocks
  • define and use static member variables
  • differentiate between the semantics of throwing runtime exceptions vs. throwing checked exceptions
  • implement exception handling in a chain of methods that sequentially call each other
  • implement the Serializable interface in user-defined classes so that they can be written to and read from using ObjectOutputStream and ObjectInputStream objects
  • instantiate and throw custom exception objects of both checked and unchecked exception types
  • invoke static and non-static methods of a class
  • recognize how static methods can be accessed by instances of a class
  • recognize how variables of primitive types are governed by pass-by-value semantics in Java
  • recognize how variables of reference types are governed by pass-by-reference semantics in Java
  • recognize the exact semantics and limitations of the finally block
  • recognize the precise semantics of the try-with-resources construct in Java
  • use initialization blocks to appropriately initialize static and non-static member variables
  • use multiple independent catch blocks with a single try block
  • use the BufferedReader and BufferedWriter classes to efficiently interact with character streams
  • use the DataInputStream class to read primitive types and strings from byte streams
  • use the ObjectOutputStream class to write objects of any type to byte streams

RECENTLY ADDED COURSES