Source Code เพื่อ การศึกษา
j0501.java
j0501
// ::: โปรแกรมลำดับที่ 19 // 1. ประกาศอาร์เรย์ และแสดงข้อมูลในอาร์เรย์ทั้งหมด class j0501 { public static void main(String args[]) { int x[] = {4,18,12}; System.out.println("Amount of array = " + x.length); for (int i = 0; i < x.length; i++) { System.out.println("element "+i+" = "+x[i]); } } }
ปรับปรุงโปรแกรม source.pl : 2553-03-20