Consider the following program:
import java.util.*; class Main {/*w w w .j a va2 s. c o m*/ public static void main(String []args) { Formatter formatter = new Formatter(); Calendar calendar = Calendar.getInstance(Locale.US); calendar.set(/* year =*/ 2012, /* month = */ Calendar.FEBRUARY, /* date = */ 1); formatter.format("%tY/%<tB/%<td", calendar); System.out.println(formatter); } }
Which one of the following options correctly describes the behavior of this program?
d)
The < symbol in a format string supports relative index with which you can reuse the argument matched by the previous format specifier.
The equivalent example of passing arguments explicitly is the following:.
formatter.format("%tY/%tB/%td", calendar, calendar, calendar);
The program used a short form by reusing the argument passed to the previous format specifier:
formatter.format("%tY/%<tB/%<td", calendar);