java.time.Year.with(TemporalField field, long newValue)


java.time.Year.with(TemporalField field, long newValue)

package com.codingdict;



import java.time.Year;

import java.time.temporal.ChronoField;



public class YearDemo {

   public static void main(String[] args) {



      Year date = Year.parse("2017");

      Year result = date.with(ChronoField.YEAR,2013);

      System.out.println(result);  

   }

}