• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






五色风车

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2020年8月21日

Java中的finally 和return
摘要: 直接上代码 public static int a(){ int i = 1; try{ i++; return ++i; }catch(Exception e){ }finally { if(i > 1){ System.out.println(" i = " + i);// i = 3 } } 阅读全文
posted @ 2020-08-21 14:11 五色风车 阅读(448) 评论(0) 推荐(0)
 
String hashCode 方法为什么选择数字31作为乘子
摘要: String hashCode 的实现方法 public int hashCode() { int h = hash; if (h == 0 && value.length > 0) { char val[] = value; for (int i = 0; i < value.length; i+ 阅读全文
posted @ 2020-08-21 10:04 五色风车 阅读(154) 评论(0) 推荐(0)