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
Q23: What is the value of the following
Q32: Which of the following statements is correct
Q50: What is the value of the following
Q74: What is the value of Math.pow(2, 3)?
A)5.0
B)6.0
C)8.0
D)9.0
Q95: What is the output of the following
Q110: Assume the following variables have been declared
Q111: A student's class average can be computed
Q114: What will be printed by the statements
Q116: Which one of the following is a
Q117: Which of the following is the mathematical
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents