Mega Code Archive

 
Categories / Java Tutorial / Development
 

Two digit seconds ranging from 00 to 60

import java.util.Date; public class MainClass {   public static void main(String[] args) {     Date now = new Date();     System.out.printf("two digit seconds ranging from 00 to 60 : %tS/%TS\n", now, now);   } } // two digit seconds ranging from 00 to 60 : 57/57