(2.3) Objects: Every Java object has their own copy of the attributes/instance variables (video)
(2.4) References: A reference is like a remote control that keeps track of the object (slides, video)
(2.5) Types: Non-primitive variable types always store a reference (slides, video)
(2.6) null String reference: If we don’t give a reference variable a value, it will be null (slides, video)
(2.7) Null Pointer Exception: We get a Null Pointer Exception when we call a method on a variable that is null (slides)
(2.8a) Constructors: Calling a constructor makes a new object (slides, video)
(2.8b) Constructors: Calling a constructor makes an object (Video)
(2.9a) Null: A reference that isn't set is a null reference (video)
(2.9b) null: If we don’t give a reference variable a value, it will be null (video)
(2.10) Objects: Objects each have their own data (slides)
(2.11a) Aliasing: (Dog Alias) In an assignment statement, we always copy the value in the variable (slides, video)
(2.11b) Aliasing: Two variables can reference the same object and both of them can modify it (video)
(2.11c) Aliasing: Two variables can reference the same object (video)
(2.12) Aliasing: (String Alias) In an assignment statement, we always copy the value in the variable (slides, video)
(2.13) Assignment: Variables do not become linked (slides)
(2.14) Aliasing: When two variables reference the same object, they can both call methods on it (DRAFT; slides)
Unit 2 Bonus - Writing and calling static methods
(2.15) Assignment: Calling a method with an argument is another way to assign a value to a variable (video)
Unit 3 - Booleans and Conditionals
(3.1) Equality: == with ints and object references check if the variable’s contents are identical (video)
Unit 4 - Loops/Iteration
(4.1) while: while loops allow us to repeat actions until a condition is not met (video)
(4.2) while: while loops check the condition before executing the body of the loop (video)
(4.3) for loops: while loops can be rewritten as a for loop (video)
(4.4) for loops: for loops separate the body of the loop from the update of the loop variable (video)
Unit 5 - Writing Classes
(5.1) this: The variable this is created when we call a method on an object (video)
(5.2) Instance Variables: An object contains the values of each of the instance variables in the class (video)
Unit 6 - Arrays
(6.1) int array: A variable can hold a reference to an int array (video)
(6.2) null: A reference that isn't set is a null reference (video)
(6.3) Aliasing: Two variables can reference the same int array and both of them can modify it (video)
(6.4) Aliasing: An array passed to a method can be modified within that method (video)
(6.5) Creating Arrays: When we create an array of Strings, we create String references. If we don’t give a reference variable a value, it will be null.
(6.6) Creating Arrays: When we first create an array variable, we can give it a value by putting the contents of the array in curly braces. Inside the curly braces, each element of the array is separated by commas.
(6.7) Array Assignment: We refer to an element in an array by using the array name followed by an index in square brackets.
Unit 7 - ArrayLists
Unit 8 - 2D Arrays
(8.1) Creating 2D Arrays: An int 2D array is really an array of int[] references, but we think about it like a table of int values.
(8.2) Creating 2D Arrays: A String 2D array is really an array of String[] references, but we think about it like a table of String values.
(8.3) Creating 2D Arrays: When we first create an array variable, we can give it a value by putting the contents of the array in curly braces. Inside the curly braces, each element of the array is separated by commas.
Unit 9 - Inheritance
(9.1) Variable Type vs Object Type: There is a difference between the type of a variable and the type of an object (video)
(9.2) Method Execution - No Inheritance: When we call a method on an object, we look in the object’s class to find the code for the method (video)
(9.3) Syntax to Extend a Class: A class can extend another class to reduce redundant code, and an extending class can add methods, inherit methods, or override methods (video)
(9.4) Method Execution with Inheritance: If we don’t find a method in a class, we look in the parent’s class (video)
(9.5) Inheriting a Grandparent's Method: If we don’t find a method in a class, we look in the parent’s class (video)
(9.6) Polymorphism Introduction: The type of the object must be the same class or a subclass of the type of the variable. If not, the type of the variable would imply that the object would have methods that it might not have (video)
(9.7) Method Calls with Polymorphism: When we call a method on an object, we look in the object’s class to find the code for the method (video).
[9.8] Motivation for Polymorphism: When we call a method on an object, we look in the object’s class to find the code for the method (video)
[9.9] Compilation Rules for Methods: The type of the variable determines what methods can be called. The type of the object determines what method is called (video)
[9.10] Casting: Casting creates an additional reference to an object with the promised type (Video)