Calendar.MONTH has the following syntax.
public static final int MONTH
In the following code shows how to use Calendar.MONTH field.
import java.util.Calendar; // w ww. jav a 2 s. c o m public class Main { public static void main(String[] args) { Calendar now = Calendar.getInstance(); System.out.println((now.get(Calendar.MONTH) + 1)); } }
The code above generates the following result.