📄 quiz7_5.java
字号:
public class Quiz7_5 implements Cloneable {
StringBuffer sb
= new StringBuffer( "Good morning!" );
public Object clone()
throws CloneNotSupportedException {
Quiz7_5 result = (Quiz7_5) super.clone();
result.sb = this.sb;
return result;
}
public static void main( String[] args )
throws CloneNotSupportedException {
Quiz7_5 x = new Quiz7_5();
Quiz7_5 y = (Quiz7_5) x.clone();
x.sb.append( " How are you today?" );
System.out.println( y.sb );
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -