Term
|
Definition
Application program interface. Contains predefined classes and interfaces for developing Java programs. |
|
|
Term
|
Definition
Java Development Toolkit. A set of separate programs, each invoked from a command line, for developing and testing Java programs. |
|
|
Term
|
Definition
Integrated development environment. A software application that normally consists of a source code editor, compiler, build automation tools, and a debugger. |
|
|
Term
|
Definition
A specification for software which interprets Java programs that have been compiled into byte-codes, and usually stored in a ".class" file. |
|
|
Term
Display message in dialog box |
|
Definition
import javax.swing.JOptionPane; Main method JOptionPane.showMessageDialog(null, "Message dialog"); |
|
|
Term
|
Definition
public class Class { public static void main(String[] args) { |
|
|
Term
Reading input from the console |
|
Definition
import java.util.Scanner; Main method Scanner input = new Scanner(System.in); |
|
|
Term
|
Definition
final datatype CONSTANT = VALUE; |
|
|
Term
Data types from smallest to largest |
|
Definition
byte short int long float double |
|
|
Term
|
Definition
i = i + 8 i+=8 i-= i*= i/= i%= |
|
|
Term
|
Definition
System.out.println((int)1.7) displays 1 System.out.println((double)1/2) displays 0.5 |
|
|
Term
|
Definition
char is used to represent a single character. char letter = 'A'; char numChar = '4'; |
|
|
Term
Increment/decrement character data type |
|
Definition
char ch = 'a'; System.out.println(++ch); displays 'b' |
|
|
Term
Getting input from input dialogs |
|
Definition
String variableNameString = JOptionPane.showInputDialog("Input dialog"); datatype variableName = Datatype.parseDatatype(variableNameString); |
|
|
Term
|
Definition
Hold either 'true' or 'false' |
|
|
Term
Logical/Boolean Operators |
|
Definition
! not && and || or ^ exclusive or |
|
|
Term
|
Definition
if (boolean expression) { statement; } |
|
|
Term
|
Definition
if (boolean exp.) { statements; } else { statements; } |
|
|
Term
|
Definition
if (i>k) { if (j>k) System.out.print("i & j > k"); } else System.out.print("i<=k"); |
|
|
Term
|
Definition
switch (switch expression) { case value1: statement1; break; case value2: statement2; break; default: default statement; } |
|
|
Term
|
Definition
executes the statements in the loop body until the loop continuation condition is no longer true. while (loop continuation condition) { statements; } |
|
|
Term
|
Definition
The loop body is executed first. Then the loop continuation condition is evaluated and if it's true the loop body is executed again; if it's false the loop ends. do { statements; } while (loop continuation condition); |
|
|
Term
|
Definition
Performs initial action once, then repeatedly executes the statements in the loop body, and performs an action after each iteration for (initial action; loop continuation condition; action after each iteration){ statement; } |
|
|
Term
|
Definition
Each time the outer loop is repeated, the inner loops are reentered and started anew. |
|
|
Term
|
Definition
Immediately terminates the loop. |
|
|
Term
|
Definition
Ends the current iteration. |
|
|
Term
|
Definition
modifier returnValueType methodName(list of parameters) { ex: public static int max(int num1, int num2){ |
|
|
Term
|
Definition
int larger = max(3,4); or System.out.println(max(3,4)); |
|
|
Term
|
Definition
The part of the program where the variable can be referenced. Starts from its declaration and continues to the end of the block that contains the variable. |
|
|
Term
|
Definition
elementType arrayRefVar = new elementType[arraySize];
ex: double[] myList = new double[10]; |
|
|
Term
|
Definition
double[] my List = {4, 2, 6, 8, 9}; |
|
|
Term
Passing arrays to methods |
|
Definition
public static void printArray(int[] array) {
for (int i=0; i |
|
|