这个问题多半因为你没有为packagetest
定义包.
import code.*;
package test
class packagetest
{
public static void main(String[] args)
{
HelloWorld1 test = new HelloWorld1();
test.draw(); }}
编译后运行
java test.packagetest 应该没有问题
定义包.
import code.*;
package test
class packagetest
{
public static void main(String[] args)
{
HelloWorld1 test = new HelloWorld1();
test.draw(); }}
编译后运行
java test.packagetest 应该没有问题
http://community.csdn.net/Expert/topic/3453/3453703.xml?temp=.5173151
是定义包可以
不定义包也可以删掉HelloWorld1.java源文件