package com.chongrui.test;

/*
 *使用while循环遍历数组
 *
 *
 * */


public class test {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
   
        String[] aves = new String[]{"白路","丹顶鹤","百灵"};//创建鸟类数组
        int index = 0;//创建索引
        System.out.println("我家花园有这种各类的鸟");
        while(index<aves.length){
            
            System.out.println(aves[index++]+" ");//自增索引值
        }
        
        
        
        
        
        
    }
    

}
======================

我家花园有这种各类的鸟
白路
丹顶鹤
百灵

 

相关文章:

  • 2022-12-23
  • 2021-09-14
  • 2021-11-28
  • 2021-12-10
  • 2022-02-16
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-27
  • 2021-08-27
  • 2021-11-03
  • 2022-12-23
相关资源
相似解决方案