1. Year represented as a simple Whole Value.

Listing 1. Year represented as a simple Whole Value.


public final class Year
{
    public static Year valueOf(int year)
        { return new Year(year); }
    public Year(int year) { value = year; }
    public int getValue() { return value; }
    private final int value;
}

About the Author

Kevlin Henney is a Principal Technologist with QA Training in the UK.

Upcoming Training Events

0 AM
Visual Studio Live! San Diego
September 8-12, 2025
Live! 360 Orlando
November 16-21, 2025
Cloud & Containers Live! Orlando
November 16-21, 2025
Data Platform Live! Orlando
November 16-21, 2025
Visual Studio Live! Orlando
November 16-21, 2025