java循环

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);
      }
  }
}
 
posted @ 2023-06-24 23:17  r7ftf  阅读(7)  评论(0)    收藏  举报