`
javne
  • 浏览: 66680 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论
文章列表
clone一个副本: public Object clone() { try { ArrayList<E> v = (ArrayList<E>) super.clone(); v.elementData = Arrays.copyOf(elementData, size); v.modCount = 0; return v; } catch (CloneNotSupportedException e) { // this shouldn't happen, since we are Cloneable ...
ArrayList是我们使用得最多的一个集合类之一 一般用来做包装DTO到view层来显示数据.   ArrayList继承了AbstractList类,实现了List,RandomAccess,Cloneable接口 public class ArrayList<E> extends AbstractList<E> implements List<E>, RandomAccess, Cloneable, java.io.Serializable   内部结构是一个Object类型的数组 private transient Object[] e ...
public class DBConn { private final static String DRIVER = "com.microsoft.jdbc.sqlserver.SQLServerDriver"; // 数据库驱动 private final static String URL = "jdbc:microsoft:sqlserver://localhost:1433;DataBaseName=medical"; // url private final static Stri ...
public ActionForward upLoad(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws FileNotFoundException, IOException { FileForm fileForm=(FileForm)form; List<FileForm.myFile> files=fileForm.getImportFileList(); for(int i =0;i<fi ...
Map<String,String> map=new HashMap<String,String>(); map.put("username", "qq"); map.put("passWord", "123"); map.put("userID", "1"); map.put("email", "qq@qq.com");  第一种用for循环 for(Map.Entry<String ...
Global site tag (gtag.js) - Google Analytics