关于java编程思想第三版中的例子编译问题
c03中的,代码如下:
[code="java"]
//: com:bruceeckel:simpletest:NumOfLinesException.java
// From 'Thinking in Java, 3rd ed.' (c) Bruce Eckel 2002
// www.BruceEckel.com. See copyright notice in CopyRight.txt.
package com.bruceeckel.simpletest;
public class NumOfLinesException extends SimpleTestException {
public NumOfLinesException(int exp, int out) {
super("Number of lines of output and "
+ "expected output did not match.
" +
"expected: <" + exp + ">
" +
"output: <" + out + "> lines)");
}
} ///:~
[/code]
同目录下已经有SimpleTestException.java和SimpleTestException.class,
可编译还是报错 。
报错信息如下 :
E:work_alljavajava_sam3rdcomruceeckelsimpletest>javac NumOfLinesException.java
NumOfLinesException.java:7: cannot find symbol
symbol: class SimpleTestException
extends SimpleTestException {
^
1 error
有人遇到过这样的情况吗 ?