小圆细胞肿瘤:哪错了。

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/29 00:31:11
class f{

public static void main(String[] args) {

int w =new Integer(args[0]).intValue();
int h= Integer.parseInt(args[1]);
//int h=integer.valudeof(args[1]).intvalue();
for(int i=0;i<h;i++)
{
StringBuffer sb=new StringBuffer();
for(int j=0;j<w;j++)
{
sb.append('*');
}
System.out.println(sb.toString());
}

}

}

这不是完整的程序。也不是完整的类的说明。没有头文件。
没有类的constructor.
没有类的destructor.
没有类的成员变量。
只有一个类的成员函数“main“。
main 是保留字,不可用来做类的成员函数名。

程序结构不对,再研究一个个语句就没意思啦。