Solved

Assume the Following Variables Have Been Declared and Given Values

Question 36

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions