Example usage for java.time MonthDay getMonthValue

List of usage examples for java.time MonthDay getMonthValue

Introduction

In this page you can find the example usage for java.time MonthDay getMonthValue.

Prototype

public int getMonthValue() 

Source Link

Document

Gets the month-of-year field from 1 to 12.

Usage

From source file:Main.java

public static void main(String[] args) {
    MonthDay m = MonthDay.now();
    int n = m.getMonthValue();
    System.out.println(n);//from  w  w w.  ja va  2s  .c  o  m

}