标题:[求助]帮忙看一看这个程序有什么错误!!
取消只看楼主
photoshopcs
Rank: 1
等 级:新手上路
帖 子:65
专家分:0
注 册:2007-3-21
 问题点数:0 回复次数:1 
[求助]帮忙看一看这个程序有什么错误!!

谢谢大家了!!
class Table{
int weight,wide,length,high,area;
char name;
Table(char x,int y,int z,int l,int m)
{name=x;
length=y;
wide=z;
high=l;
weight=m;
}
void area()
{area=length*wide;}
void display()
{
System.out.println("name is"+name);
System.out.println("length is"+length);
System.out.println("wide is"+wide);
System.out.println("high is"+high);
System.out.println("area is"+area);
System.out.println("weigth is"+weight);
}
void changeweight(int n)
{weight=n;}
public static void main(String args[]){

Table t;
t= new Table ( );
t.Table("s",12,13,14,15);
t.area();
t.display();
t.changeweight(16);
t.display();
}
}

搜索更多相关主题的帖子: display display 
2007-04-01 13:48
photoshopcs
Rank: 1
等 级:新手上路
帖 子:65
专家分:0
注 册:2007-3-21
得分:0 
好厉害的大师们谢谢
2007-04-02 17:44



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-128499-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 2.149294 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved