Lecture Outline
- Java OOP (Class, instance fields, constructors)
- Writing two Java programs that interact with each other
- Public means we can access an instance field/method from another class. Private means we cannot access the instance field/method from another class
- Instance fields should be private, Methods should be public
- In Java, you must specify the return type of the method in the method declaration
- Getter methods return values, Setter methods set values
- We can use if statements to add control flow/branching to our code
- The logical and statement in Java is &&, and checks for both conditions to be true
Lecture Recording
Lecture Slides
Code