java get number of days in month

https://‮ww‬w.lautturi.com
java get number of days in month
/**
 * @author lautturi.com 
 * Java example: See how many days there are in February,2002
 */

import java.util.*;
import java.time.YearMonth; 

public class Lautturi {

	public static void main(String[] args){

		int daysInMonth = YearMonth.of(2002, 2).lengthOfMonth();

	    System.out.println("There are " +  daysInMonth+" days in 2002,2");

	}
}

output:

There are 28 days in 2002,2
Created Time:2017-09-24 20:30:06  Author:lautturi