public class MyDate { private int day, month, year; public void tomorrow() { this.day = this.day + 1; //其他代码 } }//源代码片段来自云代码http://yuncode.net