debug7_1.java
来自「北京大学出版社的」· Java 代码 · 共 19 行
JAVA
19 行
package questions.c7;
public class Debug7_1 implements Cloneable {
StringBuffer sb
= new StringBuffer( "Sales Report for " );
public Debug7_1 clone()
throws CloneNotSupportedException {
Debug7_1 result = super.clone();
result.sb
= new StringBuffer( this.sb.toString() );
return result;
}
public static void main( String[] args )
throws CloneNotSupportedException {
Debug7_1 x = new Debug7_1();
Debug7_1 y = x.clone();
x.sb.append( "October" );
System.out.println( y.sb );
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?