Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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);
    }
}