Basic Java Flashcards
determination of the main program
public static void main(String[] args){
}
end of line comments
//
comment field
/* comment */
2 numbers each side of the decimal
double
string type
String
+ + variable;
- variable;
variable = variable + 1; variable = variable - 1;
printing operation
System.out.println();
to print a quotation mark
"
A Java keyword used in a class definition to specify that a class is not to be instantiated, but rather inherited by other classes.
abstract
A Java keyword used to resume program execution at the statement immediately following the current statement. If followed by a label, the program resumes execution at the labeled statement.
break
A Java keyword that defines a group of statements to begin executing if a value specified matches the value defined by a preceding switch keyword.
case
A Java keyword used to declare a block of statements to be executed in the event that a Java exception, or run time error, occurs in a preceding try block.
catch
A Java keyword used to declare a a single 16-bit Unicode character variable.
char
A Java keyword used to resume program execution at the end of the current loop. If followed by a label, it resumes execution where the label occurs.
continue
A Java keyword optionally used after all case conditions in a switch statement. If all case conditions are not matched by the value of the switch variable, this keyword will be executed.
default
A Java keyword used to declare a loop that will iterate a block of statements. The loop’s exit condition can be specified with the while keyword.
do
A Java keyword used to define a a double-precision 64-bit IEEE 754 floating point variable.
double
For decimal values, this data type is generally the default choice.
A Java keyword used to execute a block of statements in the case that the test condition with the if keyword evaluates to false.
else
A Java keyword used to declare an enumerated type, whose legal values consist of a fixed set of constants.
enum