Objects, the JVM and Exceptions - ISC Class 11 Computer Science Notes, Diagrams and Solved Questions

Object oriented programming: objects as data plus behaviour, classes and objects, modelling a calculator, a date and a number, changing behaviour through methods, the JVM with javac and java, compile-time and run-time errors, and exceptions with try, catch, finally, throw and throws.

In this chapter

  • Why programs are built from objects that combine data and behaviour
  • Classes as blueprints and objects as instances created with new
  • Modelling a calculator, a date and a number, and what an object's interface is
  • How adding, deleting or modifying methods changes an object's behaviour
  • How javac makes bytecode and the JVM runs it on any computer
  • The difference between compile-time and run-time errors
  • Handling exceptions with try, catch and finally, with a step-by-step dry run
  • Raising and declaring exceptions with throw and throws, and checked versus unchecked exceptions