- 浏览: 67638 次
- 性别:
- 来自: 杭州
-
最新评论
-
qscchao:
好复杂,请问博主这是那种继承方式?
hibernate annotation 继承关系映射 -
zhouxianglh:
3.collection转换的构造函数:// c.toArra ...
ArrayList源代码分析(一) -
lirlyliwen:
很强大!!如果在深圳我跟你混了。
Hibernate annotation用@SecondaryTable来实现从一个类对应多张表 -
soul_fly:
感谢分享
JAVA用URL下载网页为静态页面 -
soul_fly:
有测试过哪一种方法效率最高吗?
遍历Map的几种方法
文章列表
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
...
- 2008-10-20 13:51
- 浏览 2712
- 评论(1)
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 ...
- 2008-10-20 12:08
- 浏览 3465
- 评论(1)
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 ...
- 2008-10-18 10:01
- 浏览 1133
- 评论(0)
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 ...
- 2008-10-13 15:40
- 浏览 1385
- 评论(0)
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 ...
- 2008-08-02 15:28
- 浏览 3938
- 评论(4)