Mega Code Archive
Two digit hour on a 12-hour clock
import java.util.Date;
public class MainClass {
public static void main(String[] args) {
Date now = new Date();
System.out.printf("two digit hour on a 12-hour clock: %tI/%TI\n", now, now);
}
}
//
two digit hour on a 12-hour clock: 11/11