Afficher les nombre de jours d’un mois donné

Author:

Afficher,les,nombre,de,jours,d'un,mois,donné
{filelink=5580}


import java.util.Calendar;

public class NbrJourMois {
  public static void main(String[] argv) throws Exception
  {
    Calendar cal = Calendar.getInstance();
    int nbrJour = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
    System.out.println(nbrJour); // 30
  }
}

Leave a Reply

Your email address will not be published. Required fields are marked *