📄 client.java
字号:
package com.javapatterns.prototype.panda;
public class Client
{
private static PandaToClone thisPanda , thatPanda;
public static void main(String[] args)
{
thisPanda = new PandaToClone(15, 25);
thisPanda.setAge(3);
// Create the second object by cloning the first
thatPanda = (PandaToClone) thisPanda.clone();
// Now describe these objects on the system console :
System.out.println(" Age of this panda : " + thisPanda.getAge());
System.out.println(" height : " + thisPanda.getHeight());
System.out.println(" weight : " + thisPanda.getWeight());
System.out.println(" Age of that panda : " + thatPanda.getAge());
System.out.println(" height : " + thatPanda.getHeight());
System.out.println(" weight : " + thatPanda.getWeight());
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -