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
Q80: Which is a correct representation of the
Q81: What will be printed by the statements
Q82: Assume the following variable has been declared
Q83: What will be printed by the statements
Q84: What does the following statement sequence print
Q86: What does the following statement sequence print
Q87: What is the result of the following
Q88: Which of the following statements places input
Q89: The problem solving process emphasizes a "first,
Q90: Which one of the following statements displays
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