... 12, 1076, 20 00, 8, 622 , 127 }; int searchfor = 12; int i; boolean foundIt = false; for (i = 0; i < arrayOfInts.length; i++) { if (arrayOfInts[i] == searchfor) { foundIt = true; break; } } 17 /25 ... anArray2; 8 /25 Mảng Khởi tạo • Cách 1:dùng từ khóa new Ví dụ: int[] anArray1 = new int[6]; int[][] anArray2 = new int [2] [3]; • Cách 2: gán giá trị trực tiếp Ví dụ: int[] anArray1 = { 100, 20 0, ... someInt = (int) (5 .2 / someDouble) 12/ 25 Các lệnh điều khiển Câu lệnh if • Cú pháp if(biểu thức 1){ khối lệnh 1; } else if(biểu thức 2) { khối lệnh 2; } … else{ khối lệnh n; } 13 /25 Các lệnh điều...