• 2022-06-07
    Which statement prints the floating-point value 123.456 right justified with a field width of 10? ( )
    A: System.out.printf("%d10.3", 123.456);
    B: System.out.printf("%10.3d", 123.456);
    C: System.out.printf("%f10.3", 123.456);
    D: System.out.printf("%10.3f", 123.456);