Question: Java MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question 8) What is the result of 45 / 4?
Java
MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question
8) What is the result of 45 / 4? 8) A) 11 B) 10 C) 11.25 D) 12 9) The statement System.out.printf("%10s", 123456) outputs ________. (Note: * represents a space) 9) A) 12345***** B) 23456***** C) 123456**** D) ****123456 10) What is the printout of the following switch statement? char ch = 'b'; switch (ch) { case 'a': System.out.print(ch); case 'b': System.out.print(ch); case 'c': System.out.print(ch); case 'd': System.out.print(ch); } 10) A) b B) bb C) bcd D) abcd E) bbb 11) Which of the following are valid specifiers for the printf statement? (Choose all that apply.) 11) A) %10b B) %8.2d C) %4c D) %10.2e E) %6d 12) The statement System.out.printf("%5d", 123456) outputs ________. 12) A) 23456 B) 123456 C) 12345.6 D) 12345 13) Suppose x=10 and y=10 what is x after evaluating the expression (y >= 10) || (x++> 10)? 13) A) 10 B) 9 C) 11 2 14) How many times will the following code print "Welcome to Java"? int count= 0; do { System.out.println("Welcome to Java"); } while (++count< 10); 14) A) 11 B) 8 C) 0 D) 9 E) 10
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
