对象作为函数参数和返回结果
class Date {/*nowjava.com - 时 代 Java*/ int dd; int mm; int yyyy; static final String[] months = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; // Constructor Date(int day, int month, int year) { this.dd = day; this.mm = month; this.yyyy = year; } } /** 来 自 时代Java公众号 - nowjava.com**/ public class Main { static void Display(Date day) { System.out.println("Date:" + day.dd + "/" + day.mm + "/" + day.yyyy); } public