package com.fanxing;
import java.util.ArrayList;
import java.util.List;
public class forjiajia {
public static void main(String[] args) {
//增强for
String[] arr = {"hello","hello1","hello2","hello3"} ;
// for (int i = 0; i < str.length ; i++) {
// System.out.print(str[i] + " ");
// }
//语法 for (类型 变量:arr){
// 循环体}
// for (String s:arr){
// System.out.println(s);
// }
List<Integer> list = new ArrayList<Integer>();
list.add(123);
list.add(1234);
list.add(1235);
//增强for
for (Integer obj:list){
System.out.println(obj+100);
}
}
}