Check out example codes for "java get month". It will help you in understanding the concepts better.

Code Example 1

import java.time.ZoneId;
import java.util.Date;

new Date().toInstant().atZone(ZoneId.systemDefault()).toLocalDate().getMonthValue();

Learn ReactJs, React Native from akashmittal.com