文章分类 -  2018-JAVA

摘要:1.jdbc连接数据库,就这样子 Class.forName("com.mysql.jdbc.Driver");java.sql.Connection conn = DriverManager.getConnection(jdbcUrl); 2.通过传入jdbc url用Drivermanager. 阅读全文
posted @ 2018-05-17 17:30 He_quotes 阅读(55) 评论(0) 推荐(0)
摘要:一, Type Inference 什么是Type Inference,官方给出的定义是: Type inference is a Java compiler's ability to look at each method invocation and corresponding declarat 阅读全文
posted @ 2018-05-10 16:44 He_quotes 阅读(96) 评论(0) 推荐(0)
摘要:rrayList是基于数组实现的,是一个动态数组,其容量能自动增长,类似于C语言中的动态申请内存,动态增长内存。 ArrayList不是线程安全的,只能用在单线程环境下,多线程环境下可以考虑用Collections.synchronizedList(List l)函数返回一个线程安全的ArrayLi 阅读全文
posted @ 2018-05-06 14:39 He_quotes 阅读(111) 评论(0) 推荐(0)
摘要:for clone System.arraycopy arrays.copyof for clone System.arraycopy arrays.copyof 本文章主要分析 System.arraycopy() ,带着几个问题去看这个方法: 是浅复制 String 的一维数组和二维数组复制是否 阅读全文
posted @ 2018-05-06 14:23 He_quotes 阅读(76) 评论(0) 推荐(0)