Import statement

This statement imports classes included in the Java API, you can either import a class explicitly or use a Wildcard import statement- by using '*'- to import an entire package of related classes.

Example code

Instance field

A variable that is bound to an object.

Example code

Instance method

A method that requires an instance of the class to be created to be used.

Example code

Constructor

A method that is automatically called when an object is created. The default no-argument constructor is called unless you overload a constructor by adding arguments, and pass them in when creating the class.

Example code

If statement

The if statement is used to create a decision structure, which allows the program to have alternate paths of executions based on the given conditions of the if statement.

Example code

If-Else statement

The if-else statement will execute one group of statements if the boolean expression of the if statement returns true, and another if the expression returns false.

Example code

If-Else-If statement

The if-else-if tests a series of conditions testing each consecutive else-if for a boolean value of true.

Example code

Switch statement

The switch statement lets the value of a variable or expression determine where the program will branch to.

Example code

Compared Strings

To compare Strings you must use the equals method, as a relational operator will not work due to the Strings referencing the object's address instead of the actual value.

Example code

DecimalFormat

This class can be used to format the appearance of floating-point numbers rounded to a specified number of decimal places.

Example code

While loop

The while loop can be used to create input routines that repeat until acceptable data is entered.

Example code

Do While loop

The do-wile loop is a posttest while loop, meaning that it's boolean value is tested AFTER each iteration, meaning it will always run at least once.

Example code

For loop

The for loop is used when performing a known number of iterations in most cases. It is a count-controlled loop that iterates the count with each iteration.

Example code

Running total

A sum of numbers that accumlates with each iteration of a loop through an accumulator variable.

Example code

Sentiel Value

A value that signals when the end of a list of values has been reached.

Example code

Overloaded method

A method that shares the same name as another but has a different signature. The method used is determined by the arguments passed to it when using the method.

Example code

Overloaded Constructor

A constructor that shares the same name as another but has a different signature. The constructor used is determined by the arguments passed to it when using the constructor.

Example code

Static Class member

A member that belongs to the class, but not to the objects instantiated from the class.

Example code

Aggregation

This occurs when you use an instance of a class as a field of another class.

Example code

"This" reference

A key-word used so that an object can refer to itself. Usable in all nonstatic methods.

Example code

Over-ridden toString

You can write your own custom toString method to override the default to display information on an instantiated object of a class.

Example code

Over-ridden equals method

Over-rides the default equals methods to determine if the memory address of each object equals each other.

Example code

Array

Arrays can hold multiple values of the same data type simultaneously

Example code

ArrayList

A class in the Java API that allows you to store objects like you would values in a normal array.

Example code

Binary Search

An alternate form of seraching an array, by dividing a sorted array in half and finding out which side the variable lands on, and continues the methodology till it tests all the variables, or finds the wanted value.

Example code

Selection Sort

A sorting method, that sorts arrays starting with the smallest value at element 0 and moving up to the greatest.

Example code

Extended class

A subclass of a parent class (or super class) that acts as a specialized version of the class, that inherits it's methods

Example code

Polymorphism

Through polymorphism, a reference variable can reference various objects of class that are inherited from the variable's class.

Example code

Interfaces

An interface is a class that has all abstract classes, used specifiy the behavior of other classes.

Example code

Handeling Exception

An exception is an object that is generated as the result of an error or an unexpected event. To handle these, you must use try and catch blocks to prevent anticipated exceptions from stopping the program.

Example code

Throwing Exception

You can use the throw statement to create and 'throw' an exception object, either one of the standard Java Exceptions, or a custom Exception you have designed.

Example code

GUI Lab 1

This runs a program that simulates an Auto Maintenance company. You can add different services and see the resulting total cost.

Example code

GUI lab 2

This program runs a business trip scenario. The user enters the info for all of the expenses he occurs, and the program subtracts the eligible refunds, and displays the total he has to pay.

Example code

GUI lab 3

This program runs a GUI that has the user enter a temperature in Celsius and the program shows the resulting temerature in Farenheit.

Example code