Java program to print present month

Views: 150   

Following program shows you how to print present month.
We can get present month using in java.

import java.time.LocalDate;
import java.time.Month;

public class Basic15 {

    public static void main(String[] args) {

        LocalDate presentDate =;
        Month currentMonth = presentDate.getMonth();

        System.out.println("Present Month is: " + currentMonth);



Present Month is: MARCH
On By