A collectiom of primitive values OR objects
Array
The method that creates an instance of the class
Constructor
Integers vs. booleans
Integers --> Whole numbers
Booleans --> Decimals
Inheritance is...
A way of extending an existing class by creating a subclass which inherits all of its data and behaviors
System.out.print() vs. System.out.prinln()
System.out.print() --> same line
System.out.prinln() --> next line
A collection of ONLY objects
Arraylist
Instance variables MUST be
Private
Strings are
Call superclass constructor
super();
or
super(parameters);
Difference between calling a method and an array
Method --> ()
Array --> []
An array that uses two indices to specify the location of an element.
2-D Array
The aibility to derive a new class from an existing one
Inheritance
A float is...
Stores a decimal value with 6-7 total digits of precision
A benefit of inheritance
Instance Variables and methods of superclass are inherited
Does this work...
int[] nums = {1, 2, 3, 4};
System.out.println(nums.length());
No, nums.length without ()
return nums[2][5];
Returning value at row 2, column 5
Structure of a class
- Class Name
- Instance Variables
- Constructor
- Methods
Number of primitive types
8
When you don't have to write super() in the subclass constructor
If the superclass constructor takes no parameters
Number of types of errors
3