Java tutorial
import java.time.Period; public class Main { public static void main(String[] argv) { int yearsAtOctanner = 4; int monthsAtOctanner = 6; Period periodAtOct = Period.ofYears(yearsAtOctanner).withMonths(monthsAtOctanner); System.out.println("periodAtOct = " + periodAtOct); } }