JAVA编程需要注意的细节

时间:2014-03-20 10:18:37   收藏:0   阅读:471

1. 字符串a="", 用a==""的判断返回不了true,要用a.equals("");

2. List<Integer>中remove函数里参数用int类型删除的不是对应值,而是对应下标的值。

可使用remove((Integer)1)或remove(Integer.valueOf(1))

http://stackoverflow.com/questions/4534146/properly-removing-an-integer-from-a-listinteger

本文出自 “玄月天下” 博客,请务必保留此出处http://xuewei.blog.51cto.com/6061915/1379814

JAVA编程需要注意的细节,布布扣,bubuko.com

原文:http://xuewei.blog.51cto.com/6061915/1379814

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!