当前位置: 技术问答>java相关
定义了一个包(含一个文件(两个类)),放在同名目录下,编译通过,可执行时报错找不到mainclass
来源: 互联网 发布时间:2017-04-17
本文导语: java2参考大全上的原例:代码如下 package MyPack; class AccountBalance{ public static void main(String args[]){ Balance current[]=new Balance[3]; current[0]=new Balance("k.j.fielding",123.23); current[1]=new Balance("will tell",157.02)...
java2参考大全上的原例:代码如下
package MyPack;
class AccountBalance{
public static void main(String args[]){
Balance current[]=new Balance[3];
current[0]=new Balance("k.j.fielding",123.23);
current[1]=new Balance("will tell",157.02);
current[2]=new Balance("tom javkson",-12.33);
for(int i=0;i
package MyPack;
class AccountBalance{
public static void main(String args[]){
Balance current[]=new Balance[3];
current[0]=new Balance("k.j.fielding",123.23);
current[1]=new Balance("will tell",157.02);
current[2]=new Balance("tom javkson",-12.33);
for(int i=0;i