public class testLoop1
{
public static void main(String args[])
{
int counterLoop=8;
while (counterLoop > 0)
{
System.out.println(counterLoop);
CounterLoop - = 1;
}
}
}提示错误信息:
非法的表达式开始 line9
不是语句 line9请求:要怎么改第9行才能正确运行? Thanks!
{
public static void main(String args[])
{
int counterLoop=8;
while (counterLoop > 0)
{
System.out.println(counterLoop);
CounterLoop - = 1;
}
}
}提示错误信息:
非法的表达式开始 line9
不是语句 line9请求:要怎么改第9行才能正确运行? Thanks!
改成 -=