Lab 6.5 (Oakland): Java
We know that students entered this class with a range of Java experience and that there are aspects of Java that many people find confusing, even with prior experience. The purpose of this lab is to help you level up your Java ability.

Learning Objectives
By the end of this lab, you will be able to explain:
- The difference between static and instance methods and how to call them
- The difference between static and instance variables and how to reference them
- What overloading is and how overloaded methods are resolved
- What overriding is and how overridden methods are resolved
- What a default no-arg constructor is
- How subclasses call constructors in their superclass
- How subclasses can call methods in their superclass
- What happens if reference instance variables are not initialized
- Which operations can be performed on
null - When
NullPointerExceptionoccurs
Lab Structure (100 minutes)
- Lecture (25 minutes)
- Group work on questions (10-60 minutes)
- Students should open questions only when instructed.
- Students are required to work collaboratively on the questions.
- Students must check out with lab leaders, who will view their answers and ask for explanations.
- Exit survey (5 minutes)
Students may leave when they have completed the exit survey and been excused by a lab leader.
Resources
These resources were shared after lab for students who were unable to attend.
- video of lecture presented by Ellen Spertus
- PowerPoint slides