class ? ?OperateDemo1{? ? ? ? ? public ? static void ? main(String [] args)? ? ? ? ? ?{ ? /* for(初始化表達式;循環條件表達式;循環后的操作表達式) { 執行語句; } */ public ?static ? void ? draw( ?int ?row,int ?col) { for(int ? x=0;x<row;++x) { for(int ?y=z;y<col;y++) { System.out.print("*"); } System.out.println();//只有一個功能就是換行。? ? ? ? ? ? ? } ? } ?} ? ?? ? ? ? ??????
4 回答
已采納

qq_大人不打臉_0
TA貢獻3條經驗 獲得超2個贊
z未定義,其次定義一個函數(題目中的是draw函數)只能在類以內,main方法以外,然后在main內調用即可.
最后樓主寫的這代碼實在不知道要表達什么意思。。。。
添加回答
舉報
0/150
提交
取消