简简单单哈!
把for整个放到main中去
新建一个RrintRectangle类 class RrintRectangle(width,height){},把双层for循环放进去,另外你7.8的参数是不是打错了