| Java Arrays, Objects, Methods | CS 161 - Java |
if (expression that evaluates to a boolean result) { // Perform the enclosed statements if true ... } else { // Perform the enclosed statements if not true ... }
switch (expression that results in an integer value) { case 42: // or whatever a possible value of expression is ... break; case 39: // or whatever another possible value is ... break; ... default: // (optional) catch all other values ... break; }
|
jwd |