List of usage examples for java.time YearMonth getLong
@Override public long getLong(TemporalField field)
From source file:Main.java
public static void main(String[] args) { YearMonth y = YearMonth.now(); long m = y.getLong(ChronoField.YEAR); System.out.println(m);/*from w w w . ja va 2s . com*/ }