CIS 121 February 16, 2000


Recall our discussion of exceptions.

What is an exception?

How do we deal with exceptions?

What are the Java keywords used to deal with exceptions?

Recall that our exam is tomorrow at 11:00. It will cover Modules 1-3.

The format of the exam will be fill in the blank, definitions, discussion, and coding.

Topics for the Exam

  • What are the syntax of the header of a class definition?

  • What are formal parameters?

  • What are actual parameters?

  • What are instance variables?

  • What are instance methods?

  • What are class variables?

  • What are class methods?

  • How do we distinguish between instance variables/methods and class variables/methods

  • What is a constructor?

  • What is the purpose of a constructor?

  • What are the four choices for access control keyword?

  • What is a default package?

  • When do we use the keyword this?

  • What is the method toString used for?

  • What is a default constructor?

  • When is a default constructor used?

  • What is method overloading?

  • How many constructors can a class have?

  • What is a local variable?

  • What is an ADT?

  • What is encapsulation?

  • What is information hiding?

  • Explain where variables and methods are available when using the four access control keywords

  • What are the three aspects of good code design and explain each? (cohesion, competent/complete classes, and loose coupling)

  • What are the rules for creating named packages?

  • What are the rules for using the default package?

  • How does the compiler and interpreter use the environment variable CLASSPATH?

  • What is the finalize method?

  • What is garbage?

  • What is garbage collection?

  • How does garbage collection happen?

  • What are the seven major components in a class definition?

  • What does the StreamTokenizer do?

  • Explain how StreamTokenizer works

  • In what Java package is StreamTokenizer located?

  • What is a deprecated feature?

  • What is the Java keyword used to create an object?

  • How does it work?

  • What is a static initializer?

  • What does a static initializer do?

  • What is the syntax of a static initializer?

  • What is an inner class?

  • When do we use a class variable?

  • When do we use an intance variable?

  • When do we use a local variable?

  • What is inheritance?

  • What type of inheritance does Java support?

  • What keyword is used to implement inheritance?

  • What is the class hierarchy?

  • What is the top level of the class hierarchy?

  • How does Java deal with constructors when we use inheritance?

  • What does the super statement do in a subclass constructor?

  • What is the rule for using the super statement in a subclass constructor?

  • What happens if there is no super statement in a subclass constructor?

  • How do we override methods?

  • What are interfaces?

  • What is the Object class?

  • How can we use the Object class in our methods?

  • What are concrete methods?

  • What are concrete classes?

  • What are abstract methods?

  • What are abstract classes?

  • How do we use features from the parent class in a subclass?

  • What is polymorphism?

  • What is an example of polymorphism?

  • What does the boolean method equals do?

  • How do we use the equals method?

  • What are the four ways to obtain packages to solve real problems in Java and what is the order of preference?

  • When using the extends clause to implement inheritance, what are the four ways of describing the relationship between the classes involved?

  • What does implementing interfaces allow us to do with unrelated classes?

  • What are two examples of interfaces?

  • What is a clone?

    Also make sure you review the code examples in the blue book. There will be coding on the exam.