while (boolean expression)
if (boolean expression)
statement;
if (boolean expression)
statement1;
else
statement2;
if (boolean expression) {
statement;
}
if (boolean expression){
statement1;
} else {
statement2;
}
regularPay = rate * (double) hours;
if (hours > REGULAR_HOURS) {
overtimeHours = hours-REGULAR_HOURS;
}
if (overtimeHours > 0){
System.out.printf("For %d hours overtime, you earned an additional $%.2f\n",overtimeHours, overtimePay);
}