«^»
4.3. A class called Date

In Java, it is possible to use a class declaration to define your own type. For example, suppose that it is necessary to manipulate some dates in a program. We can think of dates as being composed of three parts, the day, month and year. Operations that are performed on dates include constructing dates, copying dates, comparing two dates, getting the day, month and year parts of a date, and performing input-output for values that are dates.