java循环

发布时间 2023-06-24 23:22:49作者: r7ftf

while

while(){}

do{}while();

for(;;){}

增强for循环

for(声明语句:表达式){}

public class zqfor {
   public static void main(String[] args) {

       int[] a = {10, 20, 30, 40, 50};
       for(int x:a){
           System.out.println(x);
      }
  }
}