Instructions: This is an ungraded fill-in-the-blank exercise. Each question consists of a sentence with one or two words left out. A button represents the missing word(s). For each question, think of the word or phrase that should fill each blank, then click on the buttons to see if you are correct. No grade is calculated for this exercise.
This exercise reviews simple Java input and output. Much of this is detailed and hard to remember, so don't expect to get every question correct.
class Echo { { BufferedReader stdin = String inData; System.out.println("Enter the data:"); System.out.println("You entered:" + inData ); } }
class EchoSquare { { BufferedReader stdin = String inData; int num, square; // declaration of two int variables System.out.println("Enter an integer:"); inData = stdin.readLine(); square = num * num ; // compute the square System.out.println("The square of " + inData + " is " + square ); } }