![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java面试题
文章平均质量分 79
denverj
这个作者很懒,什么都没留下…
展开
-
输入年月日格式yyyyMMdd,判断是否是周末
[code="java"] /** * 判断是否是周末 * @param date 表示日期的字符串,比如20100424 * @param pattern 描述日期和时间格式的模式,比如yyyyMMdd * @return * @throws ParseException */ public boolean isWeekend(String date...2010-04-24 14:56:26 · 252 阅读 · 0 评论 -
HashMap和HashTable的区别?
HashMap是HashTable的轻量级实现(非线程安全的实现),它们都实现了Map接口,主要区别在于HashMap允许空(null)键值(key),由于非线程安全,效率上高于HashTable。 [code="java"] HashMap hm = new HashMap(); hm.put(null, null); Hashtable ht = new Hashtable(); h...2010-04-27 10:15:29 · 144 阅读 · 0 评论 -
Java的Integer与int互转
[b]int转Integer[/b] [code="java"] int i = 0; Integer wrapperi = new Integer(i); [/code] [b]Integer转int[/b] [code="java"] Integer wrapperi = new Integer(0); int i = wrapperi.intValue(); [/cod...2010-08-23 21:53:47 · 2885 阅读 · 0 评论