Oracle
1Z0-851 · Question #225
1Z0-851 Question #225: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-851 to reveal the answer and full explanation for question #225. The question stem and answer options stay visible for context.
Question
Given: public class LineUp { public static void main(String[] args) { double d = 12.345; // insert code here } } Which code fragment, inserted at line 4, produces the output | 12.345|?
Options
- ASystem.out.printf("|%7d| \n", d);
- BSystem.out.printf("|%7f| \n", d);
- CSystem.out.printf("|%3.7d| \n", d);
- DSystem.out.printf("|%3.7f| \n", d);
- ESystem.out.printf("|%7.3d| \n", d);
- FSystem.out.printf("|%7.3f| \n", d);
Unlock 1Z0-851 to see the answer
You've previewed enough free 1Z0-851 questions. Unlock 1Z0-851 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.