Skip to content

Module 3 Mastery Check

wolvesled edited this page Aug 30, 2013 · 4 revisions
  1. Write a program that read characters from the keyboard until a period is received.
  2. Show the general form of the if-else-if ladder. Answer: if(condition) statement; else if(condition) statement; else if(condition) statement; else statement;
  3. Givenif(x < 10) if(y > 100) { if(!done) x = z; else y = z; } else System.out.println("error"); // what if? to what if does the last else associate? Answer: the second if.

Clone this wiki locally