yuyu
(yuyu)
高级会员

Banned
UID 15789
精华
0
积分 614
帖子 614
金钱 614 喜悦币
威望 0
人脉 0
阅读权限 50
注册 2002-8-9
状态 离线
|
[推荐阅读] 大家来看看这个cookie的奇怪问题!!高手进来!!
晕死!!!!!!!!
// demo1.java ,编译后在 e:\java\p1 中
package p1;
public class demo1
{
public String method()
{
return ("demo1----->method() ");
}
public static void main(String args[])
{
String str = "demo1: hello, welcome";
System.out.println(str);
}
}
-------------------------
// test.java 编译后在 e:\java
import p1.*;
public class test
{
public static void main(String[] args)
{
demo1 a = new demo1();
System.out.println("this is a test!!!!!!");
System.out.println(a.method());
}
}
---------------
test.java:6: cannot access demo1
bad class file: e:\java\demo1.java
file does not contain class demo1
Please remove or make sure it appears in the correct subdirectory of the classpa
th.
demo1 a = new demo1();
^
1 error
运行test 为什么不输出 “demo1----->method() ”
|
|