SHARE
TWEET

Untitled

a guest Aug 12th, 2017 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.javarush.task.task08.task0827;
  2.  
  3. import java.util.Date;
  4.  
  5. /*
  6. Работа с датой
  7. */
  8.  
  9. public class Solution {
  10.     public static void main(String[] args) {
  11.         System.out.println(isDateOdd("MAY 1 2013"));
  12.     }
  13.  
  14.     public static boolean isDateOdd(String date) {
  15.         return (new Date(date).getDay() - 1) % 2 != 0;
  16.     }
  17. }
RAW Paste Data
Top