|
import com.bruceeckel.simpletest.* ;
class Number {
int i ;
}
public class Assignment {
static Test monitor = new Test() ;
public static void main( String[] args ) {
Number n1 = new Number() ;
Number n2 = new Number() ;
n1.i = 9 ;
n2.i = 47 ;
System.out.println( "1: n1.i: " + n1.i +",n2.i:" + n2.i ) ;
n1 = n2 ;
System.out.println( "2: n1.i:" + n1.i + ",n2.i: " + n2.i ) ;
n1.i = 27 ;
System.out.println( "3: n1.i: " + n1.i + ", n2.i: " + n2.i ) ;
monitor.expect( new String[] {
"1: n1.i: 9, n2.i: 47" ,
"2: n1.i: 47, n2.i: 47" ,
"3: n1.i: 27, n2.i: 27" }) ;
}
}
我照着书上的例子 但是 用javac编译的时候 他说com.bruceeckel.simpletest.*找不到 怎么办 难道这个也要自己写么 谢谢大家了 |
|