以下为学习孔祥盛主编的<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…
使用Apache Jakarta Commons Collections: import org.apache.commons.collections.CollectionUtils; String[] strArray = {"aaa", "bbb", "ccc"}; List strList = new ArrayList(); Set strSet = new HashSet(); CollectionUtils.addAll(strLis…
JAVA的list,set,数组之间的转换,主要是使用Apache Jakarta Commons Collections,具体的方法如下:import org.apache.commons.collections.CollectionUtils; String[] strArray = {"aaa", "bbb", "ccc"}; List strList = new ArrayList(); Set strSet = new Ha…