急~~~~Eclipse的程序运行不了,有以下提示,哪位高手可以帮忙看一下啊~~
我的程序如下abstractclassGoods{Stringgoods;floatprice;doubletotal;intnum;publicabstractvoid...
我的程序如下
abstract class Goods
{ String goods;
float price;
double total;
int num;
public abstract void goods(String _goods, float _price, int _num);
}
class Common extends Goods
{ public void shoeCommon()
{ System.out.println("这是一个普通用户"); }
public void goods(String _goods, float _price, int _num)
{ goods=_goods;
price=_price;
num=_num;
total=_price*_num;
}
public void showBuy()
{ System.out.println("货物:"+goods);
System.out.println("价格:"+price);
System.out.println("数量:"+num);
System.out.println("总价:"+total);
}
}
final class Associator extends Common
{ public void showAssociator()
{ System.out.println("这是一个会员用户,享受9折优惠");
System.out.println("总价:"+total*0.9);
}
}
public class BuyGoods
可是一运行就有这样的提示
是怎么回事啊
还会有这样的提示:
java.lang.NoClassDefFoundError: J_Test
Caused by: java.lang.ClassNotFoundException: J_Test
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Exception in thread "main"
急!!!!哪位高手赶紧给我看一下吧~~~每次程序运行了就会这样。。 展开
abstract class Goods
{ String goods;
float price;
double total;
int num;
public abstract void goods(String _goods, float _price, int _num);
}
class Common extends Goods
{ public void shoeCommon()
{ System.out.println("这是一个普通用户"); }
public void goods(String _goods, float _price, int _num)
{ goods=_goods;
price=_price;
num=_num;
total=_price*_num;
}
public void showBuy()
{ System.out.println("货物:"+goods);
System.out.println("价格:"+price);
System.out.println("数量:"+num);
System.out.println("总价:"+total);
}
}
final class Associator extends Common
{ public void showAssociator()
{ System.out.println("这是一个会员用户,享受9折优惠");
System.out.println("总价:"+total*0.9);
}
}
public class BuyGoods
可是一运行就有这样的提示
是怎么回事啊
还会有这样的提示:
java.lang.NoClassDefFoundError: J_Test
Caused by: java.lang.ClassNotFoundException: J_Test
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Exception in thread "main"
急!!!!哪位高手赶紧给我看一下吧~~~每次程序运行了就会这样。。 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询