COE 318 Quiz: COE318 - Fall 2010 Quiz 1 Solution
Document Summary
Q1) what do each of the following print? (a) system. out. println("67" + (6+8)); (b) system. out. println(7 + 6 + 6 + "87"); (c) system. out. println((6+77) + "78"); (d) system. out. println("87" + 7 + 68); (e) system. out. println(8 + "77"); Q2) draw a line between each term in the first column to the meaning in the second column that most closely matches it. Q3) consider the following program. public class quiz { private int id; public quiz() { id = 0; public static void main (string [] args ) { Q4) fill in the two blanks so that the following loop iterates exactly 6 times. int x = 12; while (x _<=__ 17) System. out. println( x ); x = x _+__ 1; Q5) fill in the two blanks in the following program: public class book { private string author; // constructor: initializes the instance variables public book(string t) { author = t; public string getauthor() { return author; public static void main(string[] args){