摘要: final Entry<K,V> getFloorEntry(K key) { Entry<K,V> p = root; while (p != null) { int cmp = compare(key, p.key); if (cmp > 0) { if (p.right != null) p 阅读全文
posted @ 2021-08-01 23:28 fat鑫 阅读(71) 评论(0) 推荐(0)
摘要: 代码 int a =1; try { return a; }finally { return 2; } 上面这段代码最终会返回 2 ,因为finally一定会程序return返回之前执行。当程序执行到try 块里的return时,因为finally还没有执行,所以这里程序并不会返回,而是接着执行fi 阅读全文
posted @ 2021-07-30 20:35 fat鑫 阅读(58) 评论(0) 推荐(0)
摘要: public ListNode solution(ListNode l1, ListNode l2){ if(l1 == null)return l2; if(l2 == null)return l1; ListNode res = new ListNode(); ListNode result = 阅读全文
posted @ 2021-07-27 17:22 fat鑫 阅读(60) 评论(0) 推荐(0)