Example usage for java.time YearMonth toString

List of usage examples for java.time YearMonth toString

Introduction

In this page you can find the example usage for java.time YearMonth toString.

Prototype

@Override
public String toString() 

Source Link

Document

Outputs this year-month as a String , such as 2007-12 .

Usage

From source file:Main.java

public static void main(String[] args) {
    YearMonth y = YearMonth.now();
    System.out.println(y.toString());

}