Mega Code Archive

 
Categories / Java Tutorial / Development
 

A one-or-two-digit day of the month

import java.util.Date; public class MainClass {   public static void main(String[] args) {     Date now = new Date();     System.out.printf("a one-or-two-digit day of the month: %te/%Te\n", now, now);   } } a one-or-two-digit day of the month: 24/24