美文网首页
用while循环遍历

用while循环遍历

作者: 神坛下的我 | 来源:发表于2018-08-17 11:21 被阅读0次
public class ErgodicArray {
    public static void main(String[] args) {
        String[] strings = new String[]{"a","b","c"};
        int index = 0;
        while(index<strings.length){
            System.out.println(strings[index++]);
        }
    }
    
}

相关文章

网友评论

      本文标题:用while循环遍历

      本文链接:https://www.haomeiwen.com/subject/wdyzbftx.html