Online Java Compiler By
JavaTpoint.com
import java.time.YearMonth; public class YearMonthExample1 { public static void main(String[] args) { YearMonth ym = YearMonth.now(); System.out.println(ym); } }
Output