<%@page import="cn.hncu.domain.User"%><!--这里是进行导包--><%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&…
1.list转set Set set = new HashSet(new ArrayList()); 2.set转list List list = new ArrayList(new HashSet()); 3.数组转为list List stooges = Arrays.asList("Larry", "Moe", "Curly"); 此时stooges中有有三个元素.注意:此时的list不能进行add操作,否则会报“java.lang.Uns…