The statement System.out.printf("%10s", 123456) outputs ___________. (Note: * represents a space)
a. 123456****
b. 23456*****
c. 12345*****
d. ****123456
d %10s specifies to display a string with width 10 . By default, it is right justified. So, the correct answer is D.
Computer Science & Information Technology
You might also like to view...
A key feature of computers is their programmability.
Answer the following statement true (T) or false (F)
Computer Science & Information Technology
If the sort pattern split routine consistently splits the array into two pieces size 1 and another of size N-1 then the run time is”
a) O(N 2 ) b) O(log N) c) O(N 1/2 ) d) O(N log N) e) The run-time depends on too many things to answer this.
Computer Science & Information Technology