实现代码: package com.corejava.chap02; public class Date { private int year; private int month; private int day; public Date(int year, int month, int day) { this.year = year; this.month = month; this.day = day; } public void display(){ System.out.println…