Solved

Assume InputFile Is a Scanner Object Used to Read Data

Question 72

Multiple Choice

Assume inputFile is a Scanner object used to read data from a text file that contains a series of double values.Select an expression to complete the following code segment, which reads the values and prints them in standard output, one per line, in a field 15 characters wide, with two digits after the decimal point. Assume inputFile is a Scanner object used to read data from a text file that contains a series of double values.Select an expression to complete the following code segment, which reads the values and prints them in standard output, one per line, in a field 15 characters wide, with two digits after the decimal point.    A) System.out.printf( %15f ,value) ; B) System.out.printf( %.2f ,value) ; C) System.out.printf( %15.2f\n ,value) ; D) System.out.printf( %15.2f ,value) ;


A) System.out.printf("%15f",value) ;
B) System.out.printf("%.2f",value) ;
C) System.out.printf("%15.2f\n",value) ;
D) System.out.printf("%15.2f",value) ;

Correct Answer:

verifed

Verified

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

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents