CMSC 161 Review Dr. Zoppetti --------------- Structure Example ========= ======= Program public class Rocket ... Method public static boolean rhyme (String s1, String s2) ... Statement System.out.println ("hi"); Statements ========== Declaration double x = 0.0; Assignment x = 3 / 4.0; Method call System.out.println ("bye"); For loop for (int i = 1; i <= N; ++i) ... While loop while (i <= N) ... Do-while loop do { ... } while (i <= N); If if (x % 2 == 0) ... Expressions =========== Operators +, -, *, /, % ++, -- Method calls Math fns. Math.pow (base, exp) Others rhyme ("bare", "blare") Parameters Return values Types ===== boolean boolean isSpring = true; char char letter = 'A'; int int numSpaces = 4; double double tax = 9134.75; String String s = "rabbit"; Scanner Scanner input = new Scanner (System.in); Random Random rand = new Random ();