Java下,数组转集合,集合转数组!

          String[] strs = new String[] {"34","33","23","12","45"};
		List<String> list = new ArrayList<String>();
		//数组转集合
		list = Arrays.asList(strs);
		//集合转数组
		String[] tags = list.toArray(new String[list.size()]);

  

posted @ 2019-03-22 09:35  代码伊甸园  阅读(211)  评论(0编辑  收藏  举报