example.java
来自「JAVA培训用实用代码」· Java 代码 · 共 24 行
JAVA
24 行
public class Example{
public static void main(String args[]){
Example ex = new Example();
int date = 9;
BirthDate d1= new BirthDate(7,7,1970);
BirthDate d2= new BirthDate(1,1,2000);
ex.change1(date);
ex.change2(d1);
ex.change3(d2);
System.out.println("date=" + date);
d1.display();
d2.display();
}
public void change1(int i){
i = 1234;
}
public void change2(BirthDate b){
b = new BirthDate(22,2,2004);
}
public void change3(BirthDate b){
b.setDay(22);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?