Term
|
Definition
Requiring you to do the same thing over and over again |
|
|
Term
|
Definition
while, do-while, for do{ } while(); |
|
|
Term
|
Definition
used when we want to do the same thing over and over, but we do not know how many times if at all
while(){ } |
|
|
Term
|
Definition
Loop cycles forever until you force the program to exit |
|
|
Term
|
Definition
Similar to a while loop, except the loop will be executed at least one time no matter what the condition evaluates to |
|
|
Term
|
Definition
Used when you know exactly how many times you want to execute a chunk of code
for(int i; boolean condition; i++) |
|
|
Term
|
Definition
stops the current iteration of a loop immediately; it stops executing code within the loop and immediately does whatever happesn when you reach the } of the loop |
|
|
Term
|
Definition
|
|
Term
|
Definition
An abstract representation of something |
|
|
Term
|
Definition
A specific instance of a class |
|
|
Term
|
Definition
Staic applied to all methods and class variables tells java that we want to associate the methods and variables with the class itself
Not applying the keyword static tells Java that we want to associate the methods and variables with the instances of the class (objects) and not the class itself. |
|
|
Term
|
Definition
Instance variables, when being referred to in a class/object context |
|
|
Term
|
Definition
a special method that is executed automatically when an object is created. Constructors can never return anything. The main purpose is to give the object's instance variables an initial value. Can only be called when the object is created.
public (){ } |
|
|
Term
|
Definition
a special method that is executed automatically when an object is created. Constructors can never return anything. The main purpose is to give the object's instance variables an initial value. Can only be called when the object is created.
public (){ } |
|
|
Term
|
Definition
tells java that we want to use an instance variable instead of a local variable by righting this.variableName |
|
|
Term
|
Definition
method that allows us to create a text based representation of the Object and return it.
public String toString(){ } |
|
|
Term
|
Definition
a collection of classes that all have something in common. Packages provide access protection and name space management |
|
|
Term
|
Definition
import location.nameoffile
i.e. import java.io.FileWriter; import java.io.*; |
|
|
Term
|
Definition
When we write code that could fail due to external conditions, we must write that code in a try block |
|
|
Term
|
Definition
all try blocks must be followed immediately by a catch block, which is a chunk of code that will be executed if something goes wrong in the try block.
catch(IOException e) { } |
|
|
Term
|
Definition
class that handles opening a file
FileWriter fw = new FileWriter("example.txt");
must close once you're done writing
fw.close(); |
|
|
Term
|
Definition
class that handles writing to the file
PrintWriter pw = new PrintWriter(fw);
print to the file:
pw.println("hello"); |
|
|
Term
|
Definition
Once a String is created, it can not be changed. |
|
|
Term
|
Definition
|
|
Term
|
Definition
Static method that accepts a set of arguments: a String called the "format String", and any variables/values you wish it to contain. It then returns a brand new String that contains a String that is formatted per your specifications. |
|
|
Term
|
Definition
a structure that can keep track of large amounts of data under a single variable name; but be of all the same type
int array[] = new int[x]; |
|
|
Term
|
Definition
int[][] array = new int[x][y]; |
|
|