Thursday, 9 February 2017

Date : YearMonthClass



public class YearMonthClass {

    public static void main(String[] args) {
        YearMonth ym = YearMonth.now();        System.out.println(ym);
        String s = ym.format(DateTimeFormatter.ofPattern("MM yyyy"));        System.out.println(s);    }
}

No comments:

Post a Comment