Multiple Choice
Assume the following variables have been declared and given values as shown:
int i = 2345;
double m = 67.8;
Which statement will give the output below?
Values are 2345 and 67.80
A) System.out.printf("Values are %10d and %7.2f", i, m) ;
B) System.out.printf("Values are %6d and %2.2f", i, m) ;
C) System.out.printf("Values are %i and %m") ;
D) System.out.println("Values are " + i + " and " + m) ;
Correct Answer:

Verified
Correct Answer:
Verified
Q31: What is the output of the following
Q32: Why is the double type not appropriate
Q33: What is the value of the var
Q34: Consider the following division statements:<br>I.22 / 7<br>II.22.0
Q35: The first step in problem solving is<br>A)To
Q37: Which of the given statements generates the
Q38: Which of the following statements about constants
Q39: What is the output of the following
Q40: What is the output of the following
Q41: Which statement about number literals in Java