class Cube{
int length,heigh,width,volume;
Cube(String length,String heigth,String width){
this.heigh = Integer.parseInt(heigth);
this.width = Integer.parseInt(width);
this.length = Integer.parseInt(length);
}
int bulk(){
return volume = heigh*width*length;
}
}
class Practice2 {
public static void main(String [] args){
Cube cu = new Cube(args[0],args[1],args[2]);//这一步貌似实现不了,请给与更正
System.out.println(cu.bulk());
}
}

解决方案 »

  1.   

    此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
    楼主【shanber】截止到2008-07-25 23:37:53的历史汇总数据(不包括此帖):
    发帖的总数量:9                        发帖的总分数:30                       每贴平均分数:3                        
    回帖的总数量:10                       得分贴总数量:3                        回帖的得分率:30%                      
    结贴的总数量:6                        结贴的总分数:0                        
    无满意结贴数:5                        无满意结贴分:100                      
    未结的帖子数:3                        未结的总分数:30                       
    结贴的百分比:66.67 %               结分的百分比:0.00  %                  
    无满意结贴率:83.33 %               无满意结分率:---------------------
    楼主加油
      

  2.   

    怎么实现不了?
    java Practice2 10 20 30 
      

  3.   

    在eclipse里面怎么输入命令行后面的数据阿
      

  4.   

    Run Test按钮->Open Run Dialog...->弹出框的左侧选择Java Application中的某个应用程序,右侧在Arguments中的Program Argumtnes中指定,空格相隔