Discuss / Java / 练习

练习

Topic source
//练习
public class Main {
	public static void main(String[] args) {
		int[] ns = { 1, 4, 9, 16, 25 };
		// 倒序打印数组元素:
		for (int i=ns.length-1; i>=0; i--) {
			System.out.println(ns[i]);
    	}
	}
}

  • 1

Reply