How do you find the number of days in a month in Java?
Since Java 8, a simple way would be:
int daysInCurrentMonth = java.time.LocalDate.now().lengthOfMonth();