Tuesday, 13 June 2017

Java - Calendar

 if(cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY || cal.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY) {
         System.out.println("Weekend");
     } else {
        System.out.println("Weekday");
     }

No comments:

Post a Comment