is a variable that is connected to the whole class, not individual objects
all variables of the one class can share this variable
with the keyword final, it is used to create a constant
is the keyword used to make a variable a constant
is a resizable array
uses the List interface
only holds objects
built-in methods for inserting, deleting
can use the for-each loop or a for loop
Int x = 9;
x = x/2;
What does x equal?
String s = "tomboy";
Int x = 25 % 6;
what is x?
Which is correct?
A. int x = (double)4.5;
B. int x = (int) 4.5;
C. int x = 4.5;
String w = "ans: "+4+5;
What is w?
implements the Comparable interface
includes the following methods: toString(), toUpperCase(), toLowerCase()
Java doesn't always test both halves of a boolean operation.
&& - if the first part is false, the whole thing will be false
|| - if the first part is true, the whole thing will be true
What is output from this loop?
Why is it best to use .equals instead of == with objects
(check all that apply)
== only does a test for equality on primitives
== tests only for the values of the objects
.equals tests the memory address of objects
.equals tests the primitives located at the memory address of objects
This Java principle allows for the following:
many methods in the same class can have the same name
Java can tell the methods apart using the signature
the signature of the method must have different parameters
Wrapper class that holds ints
Used to store ints in an ArrayList
An arracy can hold primitive or class types
all elements are of the same type
Creates a reference to an object in memory
Calls the constructor
Builds an object in memory
Sets up all the variables in the object
has the same name as the class