list.set.map.array间的相互转换 list转set Set set = new HashSet(new ArrayList()); set转list List list = new ArrayList(new HashSet()); array转为list List stooges = Arrays.asList("Larry", "Moe", "Curly"); 或者 String[] arr = {"1",…
以下为学习孔祥盛主编的<PHP编程基础与实例教程>(第二版)所做的笔记. 数组和变量间的转换函数 1. list() 语言结构 程序: <?php $info = array('coffee','brown','caffeine'); list($drink,$color,$power) = $info; echo "$drink is $color and $power makes it special.<br/>"; //coffee is brown…