将数组转换成list

public class ArrayAndListChange {
	public static void test() {
		String[] str = { "properties", "accident", "biz", "froce" };
		List<String> list = new ArrayList<String>();
		list = Arrays.asList(str);
		System.out.println(list);
	}

	public static void main(String[] args) {
		test();
	}
}

  

posted @ 2018-02-27 16:38  qqyong  阅读(135)  评论(0)    收藏  举报