Java keywords


Keyword Context Description Explained in video*
boolean Primitive data type for a truth value. Can be either true or false. Lesson 79
break loops Immediately terminates the loop. Control flow jumps to the first statement behind the loop. Lesson 55
break switch Prevents fall-through in a branch of a switch-statement. Lesson 128
byte Primitive data type for a byte (sequence of 8 bits). Lesson 242
case Introduces each branch of a switch-statement. Lesson 128
char Primitive data type for a single unicode character. Lesson 241
class Used to declare an own object data type (class). Lesson 145
continue Skips the rest of the loop body. Control flow jumps to the check of the termination condition. Depending on the termination condition the loop is continued or terminated. Lesson 243
default The default branch of a switch-statement is executed if none of the case branches was executed. Similar to an else branch of an if-statement. Lesson 128
do Beginning of a do-while loop. Lesson 47
double Default primitive data type for floating point numbers. Lesson 35
else The else-branch of a conditional statement is executed if none of the previous if and else-if branches were executed. Lesson 41
false termination condition Literal for the value boolean value false. Lesson 47
false boolean variable Literal for the value boolean value false. Lesson 79
final Declares a constant primitive value or a constant reference. Please note that in case of a reference only the reference itself is constant, the referenced object can still be changed. Lesson 235
float Primitive data type for a floating point number with a smaller value range than double. Lesson 242
for Beginning of a for or for-each loop. For and for-each loops are often used to iterate through an array. Lesson 207
if Conditional statement that is executed only when the if-condition is evaluated to true. Lesson 25
import Importing the class Scanner means to let Java know that we would like to use the class java.util.Scanner under the simple name Scanner. Lesson 185
int Default primitive data type for integer numbers. Lesson 22
long Primitive data type for an integer number with a larger value range than int. Lesson 242
new Creates a new instance of an object data type (class). Lesson 163
package Determines the package name of the class. The package name has to match the directory structure in which the class is located. Lesson 184
private Access modifier. Private attributes and methods are only accessible within the class that declares the attribute or method. Lesson 157
public Access modifier. Public attributes and methods are also accessible from outside the class that declares the attribute or method. Lesson 157
return Immediately terminates a method call and might return a value to the caller. Control flow jumps back to the caller. In concrete to the first statement behind the method call. Lesson 97
short Primitive data type for an integer number with a smaller value range than int. Lesson 242
static Declares a class variable (static variable) or a class method (static method). A class variable only exists once and is shared among all instances. A class method has no access to instance variables or instance methods. Lesson 229
switch Control structure that can sometimes be used to replace an if-statement with several branches. Lesson 128
this Reference to the own instance in constructors and instance method calls. Lesson 167
true termination condition Literal for the value boolean value true. Lesson 47
true boolean variable Literal for the value boolean value true. Lesson 79
void Used in a method declaration to indicate that the method does not return anything. The keyword void is written before the method name instead of the return type. Lesson 97
while do-while loop End of a do-while loop. Lesson 47
while while loop Beginning of a while loop. Lesson 52
* Please buy the course Java for newcomers and log in to udemy.com to watch the explanation videos.