菜鸟教程java第十八篇
Java 实例 - 数组输出
以下实例演示了如何通过循环输出数组:
public class Welcome { public static void main(String[] args){ String[] runoobs = new String[3]; runoobs[0] = "菜鸟教程"; runoobs[1] = "菜鸟工具"; runoobs[2] = "菜鸟笔记"; for (int i = 0; i < runoobs.length; i++){ System.out.println(runoobs[i]); } } }