글쓴이 :Aaron Myung 1998년 9월 13일 09:27:42
Java 1.2 in 21days책을 사서 공부하기 시잣했습니다만...
class Jabberwock {
String color;
String sex;
boolean hungry;
void feedJabberwock() {
if (hungry == true) {
System.out.println("Yum -- a peasent!.");
hungry = false;
} else
System.out.println("No, thanks -- already ate.");
}
void showAttributes() {
System.out.println("This is a " + sex + " " + color + " jabberwock.");
if (hungry == true)
System.out.println("The jabberwock is hungry.");
else
System.out.println("The jabberwock is full.");
}
public static void main (String argument[]) {
Jabberwock j = new Jabberwock();
j.color = "orange";
j.sex = "male";
j.hungry = true;
System.out.println("Calling showAttributes.");
j.showAttributes ();
System.out.println("-----");
System.out.println("Feeding the Jabberwock.");
j.feedJabberwock ();
System.out.println("-----");
System.out.println("Calling showAttributes.");
j.showAttributes ();
System.out.println("----");
System.out.println("Feeding the jabberwock.");
j.feedJabberwock ();
j.feedJabberwock ();
}
}
위의 내용처럼 제생각엔 책하고 똑같이 타입한것같은데 도스상에서java Jabberwock 이라고 타입해도(책에서 말한것처럼)
Exception in thread"main" java.lang.NoClassDefFoundError:Jabberwock
이라는 멧세지가 나와...
설명좀해주세요...그리고 해결방법도...
고맙습니다.