Java基础
文章平均质量分 73
超凡绝伦的人中龙凤
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
从数据库中提取数据并注入到对象中
1.在类DBHelper中,使用方法finds查询数据,并注入到对象中//将数据库的值注入到对象中 public List finds(String sql,Class c,Object ...params) { List list=new ArrayList(); ResultSet rs=null; Connection con=null; PreparedStatem原创 2017-08-07 17:10:58 · 5608 阅读 · 0 评论 -
Integer 数值范围在-128~127之间时分别使用 ==和 equals进行比较
Integer a=128; Integer b=128; Integer c=127; Integer d=127; System.out.println(a==b);//false System.out.println(a.equals(b));//true System.out.println(a==Integer.valueOf(128));//false System.o原创 2017-11-02 21:28:55 · 4476 阅读 · 2 评论
分享