[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"site-config":3,"primary-menu":20,"tags-cloud":109,"tagposts-interview-6":293},{"config":4,"socialLinks":19},{"title":5,"subtitle":6,"logoUrl":7,"faviconUrl":8,"footerText":9,"beianIcp":10,"beianPublicSecurity":9,"seoDescription":11,"seoKeywords":12,"homepageTitle":13,"homepageSubtitle":14,"analyticsHeadCode":15,"planetQrcodeUrl":16,"planetIntroHtml":9,"planetCtaText":17,"updatedAt":18},"编码世界","用编码改变世界","https:\u002F\u002Fcdn.mashangan.com\u002Fupload\u002F2026\u002F09\u002F2f277021172f43f6bb34e1c115760b7f.png","https:\u002F\u002Fcdn.mashangan.com\u002Fupload\u002F2026\u002F09\u002Fdcbad022e68c4a729a5dc4997a9bba8a.png","","苏ICP备2026073884号","编码世界（mashangan.com）是面向 Java 后端与 Go 语言的系统化编程教程站：提供\nMyBatis Plus、Lombok、Java 8、IDEA、Docker 等原创图文教程，以及 JVM、并发、\nSpring、MySQL、Redis、消息队列、计算机网络等大厂面试八股题库，另有可落地的\n项目实战系列，帮你从入门到精通。","编码世界,Java教程,Go语言教程,Docker教程,MyBatis Plus教程,Lombok教程, Java 8新特性,IDEA教程,Java面试题,八股文,JVM面试题,Java并发面试题, MySQL面试题,Redis面试题,Spring面试题,消息队列面试题,高并发,分库分表, Netty面试题,计算机网络面试题,AI Agent,RAG,程序员学习路线","Java全栈系统化编程教程","覆盖 MyBatis Plus、Lombok、Java 8、IDEA、Go、Docker 等原创图文教程，配套大厂面试八股题库，从入门到精通，持续更新","\u003Cscript>\nvar _hmt = _hmt || [];\n(function() {\n  var hm = document.createElement(\"script\");\n  hm.src = \"https:\u002F\u002Fhm.baidu.com\u002Fhm.js?f00af7e56d956c02e11efed4131379b0\";\n  var s = document.getElementsByTagName(\"script\")[0]; \n  s.parentNode.insertBefore(hm, s);\n})();\n\u003C\u002Fscript>\n","https:\u002F\u002Fcdn.mashangan.com\u002Fupload\u002F2026\u002F09\u002Fc1a8f5de46584d3eb0bc762c180a5db9.png","扫码加入知识星球","2026-10-05T13:09:51.904487Z",[],{"metadata":21,"spec":24,"menuItems":35},{"name":22,"creationTimestamp":23},"primary","2026-09-12T06:13:55.024154Z",{"displayName":25,"menuItems":26},"主菜单",[27,28,29,30,31,32,33,34],"88c3f10b-321c-4092-86a8-70db00251b74","menu-item-izrtmxer","c4c814d1-0c2c-456b-8c96-4864965fee94","menu-item-tags","menu-item-column","menu-item-tools","menu-item-zsxq","menu-item-ocrxlczu",[36,45,55,64,73,82,91,100],{"displayName":37,"metadata":38,"spec":40,"status":43,"children":44},"首页",{"name":27,"creationTimestamp":39},"2026-09-12T06:13:54.422830Z",{"displayName":37,"href":41,"priority":42,"menuName":22},"\u002F",0,{"displayName":37,"href":41},[],{"displayName":46,"metadata":47,"spec":49,"status":53,"children":54},"Java面试八股",{"name":28,"creationTimestamp":48},"2026-09-13T09:42:02.854891Z",{"displayName":46,"href":50,"target":51,"priority":52,"menuName":22},"\u002Fjava-interview","_self",1,{"displayName":46,"href":50},[],{"displayName":56,"metadata":57,"spec":59,"status":62,"children":63},"文章",{"name":29,"creationTimestamp":58},"2026-09-12T06:13:54.457307Z",{"displayName":56,"href":60,"priority":61,"menuName":22},"\u002Farchives",2,{"displayName":56,"href":60},[],{"displayName":65,"metadata":66,"spec":68,"status":71,"children":72},"标签",{"name":30,"creationTimestamp":67},"2026-10-07T00:42:42.754151Z",{"displayName":65,"href":69,"priority":70,"menuName":22},"\u002Ftags",3,{"displayName":65,"href":69},[],{"displayName":74,"metadata":75,"spec":77,"status":80,"children":81},"项目实战",{"name":31,"creationTimestamp":76},"2026-09-14T00:35:08.138170Z",{"displayName":74,"href":78,"target":51,"priority":79,"menuName":22},"\u002Fcolumn",4,{"displayName":74,"href":78},[],{"displayName":83,"metadata":84,"spec":86,"status":89,"children":90},"在线工具",{"name":32,"creationTimestamp":85},"2026-09-14T00:35:08.171474Z",{"displayName":83,"href":87,"target":51,"priority":88,"menuName":22},"\u002Ftools",5,{"displayName":83,"href":87},[],{"displayName":92,"metadata":93,"spec":95,"status":98,"children":99},"知识星球",{"name":33,"creationTimestamp":94},"2026-09-14T00:35:08.199145Z",{"displayName":92,"href":96,"target":51,"priority":97,"menuName":22},"\u002Fzsxq",6,{"displayName":92,"href":96},[],{"displayName":101,"metadata":102,"spec":104,"status":107,"children":108},"特价云服务",{"name":34,"creationTimestamp":103},"2026-09-25T15:30:59.201614Z",{"displayName":101,"href":105,"target":51,"priority":106,"menuName":22},"\u002Fserver",7,{"displayName":101,"href":105},[],[110,117,124,131,138,145,152,159,166,172,178,184,191,197,203,209,215,221,227,233,239,245,251,257,263,269,275,281,287],{"metadata":111,"spec":113,"postCount":116},{"name":112},"tag-04980744",{"displayName":114,"slug":115},"面试题","interview",118,{"metadata":118,"spec":120,"postCount":123},{"name":119},"tag-93f725a0",{"displayName":121,"slug":122},"Java","java",68,{"metadata":125,"spec":127,"postCount":130},{"name":126},"tag-05b6053c",{"displayName":128,"slug":129},"Docker","docker",43,{"metadata":132,"spec":134,"postCount":137},{"name":133},"tag-1cba77c3",{"displayName":135,"slug":136},"IDEA","idea",32,{"metadata":139,"spec":141,"postCount":144},{"name":140},"tag-116a0109",{"displayName":142,"slug":143},"数字孪生","digital-twin",19,{"metadata":146,"spec":148,"postCount":151},{"name":147},"tag-a2fb95ac",{"displayName":149,"slug":150},"MyBatis Plus","mybatis-plus",18,{"metadata":153,"spec":155,"postCount":158},{"name":154},"tag-cc6220f9",{"displayName":156,"slug":157},"Lombok","lombok",15,{"metadata":160,"spec":162,"postCount":165},{"name":161},"tag-2a2d595e",{"displayName":163,"slug":164},"Spring","spring",10,{"metadata":167,"spec":169,"postCount":165},{"name":168},"tag-1d8a4975",{"displayName":170,"slug":171},"消息队列","mq",{"metadata":173,"spec":175,"postCount":165},{"name":174},"tag-17245299",{"displayName":176,"slug":177},"并发","concurrency",{"metadata":179,"spec":181,"postCount":165},{"name":180},"tag-4921c0e2",{"displayName":182,"slug":183},"AI","ai",{"metadata":185,"spec":187,"postCount":190},{"name":186},"tag-53bb7900",{"displayName":188,"slug":189},"卫星仿真","satellite",9,{"metadata":192,"spec":194,"postCount":88},{"name":193},"tag-62377bcf",{"displayName":195,"slug":196},"Spring Cloud","spring-cloud",{"metadata":198,"spec":200,"postCount":88},{"name":199},"tag-81c3b080",{"displayName":201,"slug":202},"MySQL","mysql",{"metadata":204,"spec":206,"postCount":88},{"name":205},"tag-86a1b907",{"displayName":207,"slug":208},"Redis","redis",{"metadata":210,"spec":212,"postCount":88},{"name":211},"tag-18897dcf",{"displayName":213,"slug":214},"Elasticsearch","elasticsearch",{"metadata":216,"spec":218,"postCount":88},{"name":217},"tag-6ce80d8e",{"displayName":219,"slug":220},"JVM","jvm",{"metadata":222,"spec":224,"postCount":88},{"name":223},"tag-aa4e1b8c",{"displayName":225,"slug":226},"Dubbo","dubbo",{"metadata":228,"spec":230,"postCount":88},{"name":229},"tag-9e30c249",{"displayName":231,"slug":232},"Netty","netty",{"metadata":234,"spec":236,"postCount":88},{"name":235},"tag-2199ace5",{"displayName":237,"slug":238},"ZooKeeper","zookeeper",{"metadata":240,"spec":242,"postCount":88},{"name":241},"tag-7c298a76",{"displayName":243,"slug":244},"设计模式","design-pattern",{"metadata":246,"spec":248,"postCount":88},{"name":247},"tag-6cf6cea9",{"displayName":249,"slug":250},"高可用","high-availability",{"metadata":252,"spec":254,"postCount":88},{"name":253},"tag-918786ab",{"displayName":255,"slug":256},"分库分表","sharding",{"metadata":258,"spec":260,"postCount":88},{"name":259},"tag-91e02cd2",{"displayName":261,"slug":262},"计算机网络","network",{"metadata":264,"spec":266,"postCount":88},{"name":265},"tag-dd302f94",{"displayName":267,"slug":268},"操作系统","os",{"metadata":270,"spec":272,"postCount":88},{"name":271},"tag-1b359d87",{"displayName":273,"slug":274},"Tomcat","tomcat",{"metadata":276,"spec":278,"postCount":79},{"name":277},"tag-f0d71b77",{"displayName":279,"slug":280},"MyBatis","mybatis",{"metadata":282,"spec":284,"postCount":52},{"name":283},"tag-a118a308",{"displayName":285,"slug":286},"时序数据库","tsdb",{"metadata":288,"spec":290,"postCount":42},{"name":289},"tag-34d1f91f",{"displayName":291,"slug":292},"Go","go",{"page":97,"size":294,"total":116,"items":295,"first":308,"last":304,"hasNext":308,"hasPrevious":304,"totalPages":97},20,[296,335,364,393,422,451,485,514,543,572,601,636,665,694,723,752,781,810],{"metadata":297,"spec":300,"status":310,"categories":315,"tags":328},{"name":298,"creationTimestamp":299},"post-mysql-slow-sql-72d516f1","2026-09-13T10:00:56.554547Z",{"title":301,"slug":302,"cover":9,"excerpt":303,"publishTime":305,"categories":306,"tags":307,"priority":42,"pinned":308,"deleted":308,"visible":309,"allowComment":304},"如何排查和优化慢 SQL？","mysql-slow-sql",{"raw":9,"autoGenerate":304},true,"2026-09-13T10:00:56.602215Z",[202],[199,112],false,"PUBLIC",{"permalink":311,"excerpt":312,"lastModifyTime":313,"phase":314},"\u002Farchives\u002Fmysql-slow-sql","一、排查步骤 开启慢查询日志：slow_query_log = ON，long_query_time = 1。 用 explain 分析执行计划，关注 type、key、rows、Extra。 用 show profile 看各阶段耗时。 二、常见优化 索引：给 where、join、order b","2026-09-16T09:13:50.446266Z","PUBLISHED",[316],{"metadata":317,"spec":322,"status":326,"postCount":88},{"name":202,"creationTimestamp":318,"labels":319,"annotations":320},"2026-09-13T09:13:25.545156Z",{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":321},"updating",{"displayName":323,"slug":202,"cover":9,"description":324,"priority":325,"hideFromList":308,"preventParentPostCascadeQuery":308},"MySQL 面试题","MySQL 面试题：索引原理、事务隔离、锁机制、SQL 调优、日志体系与分库分表。",11,{"permalink":327,"postCount":88,"visiblePostCount":88},"\u002Fcategories\u002Fmysql",[329,332],{"metadata":330,"spec":331},{"name":199},{"displayName":201,"slug":202},{"metadata":333,"spec":334},{"name":112},{"displayName":114,"slug":115},{"metadata":336,"spec":339,"status":346,"categories":350,"tags":357},{"name":337,"creationTimestamp":338},"post-mysql-mvcc-6bac3675","2026-09-13T10:00:56.263936Z",{"title":340,"slug":341,"cover":9,"excerpt":342,"publishTime":343,"categories":344,"tags":345,"priority":42,"pinned":308,"deleted":308,"visible":309,"allowComment":304},"什么是 MVCC？","mysql-mvcc",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:56.441642Z",[202],[199,112],{"permalink":347,"excerpt":348,"lastModifyTime":349,"phase":314},"\u002Farchives\u002Fmysql-mvcc","一、定义 MVCC（Multi-Version Concurrency Control，多版本并发控制），通过维护数据的多个历史版本，实现读写不阻塞，提高并发性能。 二、实现要素 隐藏字段：每行有 trx_id（创建该版本的事务 ID）和 roll_pointer（指向 undo log 中的上一版","2026-09-16T09:13:48.546617Z",[351],{"metadata":352,"spec":355,"status":356,"postCount":88},{"name":202,"creationTimestamp":318,"labels":353,"annotations":354},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":321},{"displayName":323,"slug":202,"cover":9,"description":324,"priority":325,"hideFromList":308,"preventParentPostCascadeQuery":308},{"permalink":327,"postCount":88,"visiblePostCount":88},[358,361],{"metadata":359,"spec":360},{"name":199},{"displayName":201,"slug":202},{"metadata":362,"spec":363},{"name":112},{"displayName":114,"slug":115},{"metadata":365,"spec":368,"status":375,"categories":379,"tags":386},{"name":366,"creationTimestamp":367},"post-mysql-isolation-levels-38ba7e64","2026-09-13T10:00:55.948391Z",{"title":369,"slug":370,"cover":9,"excerpt":371,"publishTime":372,"categories":373,"tags":374,"priority":42,"pinned":308,"deleted":308,"visible":309,"allowComment":304},"MySQL 的四种事务隔离级别？","mysql-isolation-levels",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:56.137691Z",[202],[199,112],{"permalink":376,"excerpt":377,"lastModifyTime":378,"phase":314},"\u002Farchives\u002Fmysql-isolation-levels","一、四种级别（由低到高） 隔离级别 脏读 不可重复读 幻读 READ UNCOMMITTED 可能 可能 可能 READ COMMITTED 否 可能 可能 REPEATABLE READ（InnoDB 默认） 否 否 否（间隙锁） SERIALIZABLE 否 否 否 二、问题解释 脏读：读到其他","2026-09-16T09:13:49.485728Z",[380],{"metadata":381,"spec":384,"status":385,"postCount":88},{"name":202,"creationTimestamp":318,"labels":382,"annotations":383},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":321},{"displayName":323,"slug":202,"cover":9,"description":324,"priority":325,"hideFromList":308,"preventParentPostCascadeQuery":308},{"permalink":327,"postCount":88,"visiblePostCount":88},[387,390],{"metadata":388,"spec":389},{"name":199},{"displayName":201,"slug":202},{"metadata":391,"spec":392},{"name":112},{"displayName":114,"slug":115},{"metadata":394,"spec":397,"status":404,"categories":408,"tags":415},{"name":395,"creationTimestamp":396},"post-mysql-transaction-acid-5795447c","2026-09-13T10:00:55.754027Z",{"title":398,"slug":399,"cover":9,"excerpt":400,"publishTime":401,"categories":402,"tags":403,"priority":42,"pinned":308,"deleted":308,"visible":309,"allowComment":304},"事务的 ACID 特性是什么？","mysql-transaction-acid",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:55.826031Z",[202],[112,199],{"permalink":405,"excerpt":406,"lastModifyTime":407,"phase":314},"\u002Farchives\u002Fmysql-transaction-acid","一、原子性（Atomicity） 事务中的操作要么全部成功，要么全部失败回滚。由 undo log 保证：记录修改前的旧值，回滚时反向操作。 二、一致性（Consistency） 事务前后数据满足业务约束。由原子性、隔离性、持久性共同保证，是事务的最终目标。 三、隔离性（Isolation） 并发事","2026-09-16T09:13:49.020776Z",[409],{"metadata":410,"spec":413,"status":414,"postCount":88},{"name":202,"creationTimestamp":318,"labels":411,"annotations":412},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":321},{"displayName":323,"slug":202,"cover":9,"description":324,"priority":325,"hideFromList":308,"preventParentPostCascadeQuery":308},{"permalink":327,"postCount":88,"visiblePostCount":88},[416,419],{"metadata":417,"spec":418},{"name":112},{"displayName":114,"slug":115},{"metadata":420,"spec":421},{"name":199},{"displayName":201,"slug":202},{"metadata":423,"spec":426,"status":433,"categories":437,"tags":444},{"name":424,"creationTimestamp":425},"post-mysql-index-btree-61981a83","2026-09-13T10:00:55.574621Z",{"title":427,"slug":428,"cover":9,"excerpt":429,"publishTime":430,"categories":431,"tags":432,"priority":42,"pinned":308,"deleted":308,"visible":309,"allowComment":304},"MySQL 索引为什么用 B+ 树？","mysql-index-btree",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:55.631382Z",[202],[112,199],{"permalink":434,"excerpt":435,"lastModifyTime":436,"phase":314},"\u002Farchives\u002Fmysql-index-btree","一、B+ 树特点 非叶子节点只存索引，不存数据，单节点可容纳更多索引，树更矮。 叶子节点通过双向链表连接，范围查询效率高。 所有数据都在叶子节点，查询路径长度一致，性能稳定。 二、为什么不用 B 树 B 树非叶子节点也存数据，导致单节点索引少、树更高、磁盘 I\u002FO 多；范围查询需要中序遍历，效率低。","2026-09-16T09:13:47.604960Z",[438],{"metadata":439,"spec":442,"status":443,"postCount":88},{"name":202,"creationTimestamp":318,"labels":440,"annotations":441},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":321},{"displayName":323,"slug":202,"cover":9,"description":324,"priority":325,"hideFromList":308,"preventParentPostCascadeQuery":308},{"permalink":327,"postCount":88,"visiblePostCount":88},[445,448],{"metadata":446,"spec":447},{"name":112},{"displayName":114,"slug":115},{"metadata":449,"spec":450},{"name":199},{"displayName":201,"slug":202},{"metadata":452,"spec":455,"status":463,"categories":467,"tags":478},{"name":453,"creationTimestamp":454},"post-jc-iterator-fail-fast-6950a006","2026-09-13T10:00:55.410836Z",{"title":456,"slug":457,"cover":9,"excerpt":458,"publishTime":459,"categories":460,"tags":462,"priority":42,"pinned":308,"deleted":308,"visible":309,"allowComment":304},"什么是 fail-fast 机制？","jc-iterator-fail-fast",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:55.460328Z",[461],"java-collection",[119,112],{"permalink":464,"excerpt":465,"lastModifyTime":466,"phase":314},"\u002Farchives\u002Fjc-iterator-fail-fast","一、定义 在用迭代器遍历集合时，如果集合结构被修改（增\u002F删），迭代器会立即抛出 ConcurrentModificationException，这就是 fail-fast。 二、实现原理 集合内部维护 modCount 记录结构修改次数。迭代器创建时记录 expectedModCount = mod","2026-09-16T09:13:48.072882Z",[468],{"metadata":469,"spec":473,"status":476,"postCount":88},{"name":461,"creationTimestamp":470,"labels":471,"annotations":472},"2026-09-13T09:13:25.521651Z",{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":321},{"displayName":474,"slug":461,"cover":9,"description":475,"priority":165,"hideFromList":308,"preventParentPostCascadeQuery":308},"Java 集合面试题","Java 集合框架面试题：HashMap、ConcurrentHashMap 等核心容器的结构与源码原理。",{"permalink":477,"postCount":88,"visiblePostCount":88},"\u002Fcategories\u002Fjava-collection",[479,482],{"metadata":480,"spec":481},{"name":119},{"displayName":121,"slug":122},{"metadata":483,"spec":484},{"name":112},{"displayName":114,"slug":115},{"metadata":486,"spec":489,"status":496,"categories":500,"tags":507},{"name":487,"creationTimestamp":488},"post-jc-set-impl-56908363","2026-09-13T10:00:55.238233Z",{"title":490,"slug":491,"cover":9,"excerpt":492,"publishTime":493,"categories":494,"tags":495,"priority":42,"pinned":308,"deleted":308,"visible":309,"allowComment":304},"HashSet 和 TreeSet 的区别？","jc-set-impl",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:55.284648Z",[461],[112,119],{"permalink":497,"excerpt":498,"lastModifyTime":499,"phase":314},"\u002Farchives\u002Fjc-set-impl","一、底层实现 HashSet：内部是 HashMap，元素作为 HashMap 的 key，value 是固定 Object。 TreeSet：内部是 TreeMap，基于红黑树。 二、对比 维度 HashSet TreeSet 有序性 无序 自然排序或定制排序 元素要求 重写 equals\u002Fhas","2026-09-16T09:13:47.112793Z",[501],{"metadata":502,"spec":505,"status":506,"postCount":88},{"name":461,"creationTimestamp":470,"labels":503,"annotations":504},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":321},{"displayName":474,"slug":461,"cover":9,"description":475,"priority":165,"hideFromList":308,"preventParentPostCascadeQuery":308},{"permalink":477,"postCount":88,"visiblePostCount":88},[508,511],{"metadata":509,"spec":510},{"name":112},{"displayName":114,"slug":115},{"metadata":512,"spec":513},{"name":119},{"displayName":121,"slug":122},{"metadata":515,"spec":518,"status":525,"categories":529,"tags":536},{"name":516,"creationTimestamp":517},"post-jc-hashmap-concurrent-64bd43b8","2026-09-13T10:00:55.033490Z",{"title":519,"slug":520,"cover":9,"excerpt":521,"publishTime":522,"categories":523,"tags":524,"priority":42,"pinned":308,"deleted":308,"visible":309,"allowComment":304},"ConcurrentHashMap 如何保证线程安全？","jc-hashmap-concurrent",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:55.084097Z",[461],[119,112],{"permalink":526,"excerpt":527,"lastModifyTime":528,"phase":314},"\u002Farchives\u002Fjc-hashmap-concurrent","一、JDK 1.7：分段锁 内部是 Segment 数组，每个 Segment 是一个小 HashMap，put 时只锁当前 Segment，并发度 = Segment 数（默认 16）。 二、JDK 1.8：CAS + synchronized 数组节点为空时，用 CAS 插入，无锁。 节点不为空","2026-09-16T09:13:46.058129Z",[530],{"metadata":531,"spec":534,"status":535,"postCount":88},{"name":461,"creationTimestamp":470,"labels":532,"annotations":533},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":321},{"displayName":474,"slug":461,"cover":9,"description":475,"priority":165,"hideFromList":308,"preventParentPostCascadeQuery":308},{"permalink":477,"postCount":88,"visiblePostCount":88},[537,540],{"metadata":538,"spec":539},{"name":119},{"displayName":121,"slug":122},{"metadata":541,"spec":542},{"name":112},{"displayName":114,"slug":115},{"metadata":544,"spec":547,"status":554,"categories":558,"tags":565},{"name":545,"creationTimestamp":546},"post-jc-hashmap-principle-21acf5b7","2026-09-13T10:00:54.826428Z",{"title":548,"slug":549,"cover":9,"excerpt":550,"publishTime":551,"categories":552,"tags":553,"priority":42,"pinned":308,"deleted":308,"visible":309,"allowComment":304},"HashMap 的底层实现原理？","jc-hashmap-principle",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:54.884321Z",[461],[112,119],{"permalink":555,"excerpt":556,"lastModifyTime":557,"phase":314},"\u002Farchives\u002Fjc-hashmap-principle","一、数据结构 JDK 1.8 后 HashMap = 数组 + 链表 + 红黑树。 数组是主体，通过 (n-1) & hash 定位桶。 哈希冲突时，同桶元素挂成链表。 链表长度 ≥ 8 且数组长度 ≥ 64 时，链表转红黑树；节点数 ≤ 6 时转回链表。 二、put 流程 计算 key 的 has","2026-09-16T09:13:44.648455Z",[559],{"metadata":560,"spec":563,"status":564,"postCount":88},{"name":461,"creationTimestamp":470,"labels":561,"annotations":562},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":321},{"displayName":474,"slug":461,"cover":9,"description":475,"priority":165,"hideFromList":308,"preventParentPostCascadeQuery":308},{"permalink":477,"postCount":88,"visiblePostCount":88},[566,569],{"metadata":567,"spec":568},{"name":112},{"displayName":114,"slug":115},{"metadata":570,"spec":571},{"name":119},{"displayName":121,"slug":122},{"metadata":573,"spec":576,"status":583,"categories":587,"tags":594},{"name":574,"creationTimestamp":575},"post-jc-arraylist-vs-linkedlist-064907ec","2026-09-13T10:00:54.635697Z",{"title":577,"slug":578,"cover":9,"excerpt":579,"publishTime":580,"categories":581,"tags":582,"priority":42,"pinned":308,"deleted":308,"visible":309,"allowComment":304},"ArrayList 和 LinkedList 的区别？","jc-arraylist-vs-linkedlist",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:54.707259Z",[461],[119,112],{"permalink":584,"excerpt":585,"lastModifyTime":586,"phase":314},"\u002Farchives\u002Fjc-arraylist-vs-linkedlist","一、底层结构 ArrayList：基于动态数组，连续内存存储。 LinkedList：基于双向链表，节点分散存储。 二、性能对比 操作 ArrayList LinkedList 随机访问 O(1) O(n) 尾部追加 O(1)（均摊） O(1) 中间插入\u002F删除 O(n)（需移动元素） O(1)（定位","2026-09-16T09:13:43.711113Z",[588],{"metadata":589,"spec":592,"status":593,"postCount":88},{"name":461,"creationTimestamp":470,"labels":590,"annotations":591},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":321},{"displayName":474,"slug":461,"cover":9,"description":475,"priority":165,"hideFromList":308,"preventParentPostCascadeQuery":308},{"permalink":477,"postCount":88,"visiblePostCount":88},[595,598],{"metadata":596,"spec":597},{"name":119},{"displayName":121,"slug":122},{"metadata":599,"spec":600},{"name":112},{"displayName":114,"slug":115},{"metadata":602,"spec":605,"status":613,"categories":617,"tags":629},{"name":603,"creationTimestamp":604},"post-jb-interface-vs-abstract-de319222","2026-09-13T10:00:54.430321Z",{"title":606,"slug":607,"cover":9,"excerpt":608,"publishTime":609,"categories":610,"tags":612,"priority":42,"pinned":308,"deleted":308,"visible":309,"allowComment":304},"接口和抽象类有什么区别？","jb-interface-vs-abstract",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:54.500384Z",[611],"java-basic",[112,119],{"permalink":614,"excerpt":615,"lastModifyTime":616,"phase":314},"\u002Farchives\u002Fjb-interface-vs-abstract","一、核心区别 维度 抽象类 接口 关键字 abstract class interface 继承 单继承 多实现 构造方法 有 无 成员变量 任意 仅 public static final 方法实现 可有抽象\u002F具体方法 默认方法、静态方法（JDK 8+） 设计目的 \"is-a\" 共性抽取 \"can","2026-09-16T09:13:43.230261Z",[618],{"metadata":619,"spec":623,"status":626,"postCount":628},{"name":611,"creationTimestamp":620,"labels":621,"annotations":622},"2026-09-13T09:13:25.495129Z",{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":321},{"displayName":624,"slug":611,"cover":9,"description":625,"priority":106,"hideFromList":308,"preventParentPostCascadeQuery":308},"Java 基础面试题","Java 基础面试题：语言特性、面向对象、异常体系、泛型、反射与常用 API。",{"permalink":627,"postCount":628,"visiblePostCount":628},"\u002Fcategories\u002Fjava-basic",8,[630,633],{"metadata":631,"spec":632},{"name":112},{"displayName":114,"slug":115},{"metadata":634,"spec":635},{"name":119},{"displayName":121,"slug":122},{"metadata":637,"spec":640,"status":647,"categories":651,"tags":658},{"name":638,"creationTimestamp":639},"post-jb-overload-vs-override-76d8b85a","2026-09-13T10:00:54.236416Z",{"title":641,"slug":642,"cover":9,"excerpt":643,"publishTime":644,"categories":645,"tags":646,"priority":42,"pinned":308,"deleted":308,"visible":309,"allowComment":304},"重载（overload）和重写（override）的区别？","jb-overload-vs-override",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:54.292575Z",[611],[119,112],{"permalink":648,"excerpt":649,"lastModifyTime":650,"phase":314},"\u002Farchives\u002Fjb-overload-vs-override","一、定义 重载：同一个类中，方法名相同，参数列表（类型\u002F个数\u002F顺序）不同。与返回值无关。 重写：子类重新实现父类的方法，方法签名（名称、参数、返回值）必须一致。 二、对比 维度 重载 重写 位置 同类 父子类 参数列表 必须不同 必须相同 返回值 可不同 相同或协变 权限 可不同 不能更严格 绑定时","2026-09-16T09:13:41.019008Z",[652],{"metadata":653,"spec":656,"status":657,"postCount":628},{"name":611,"creationTimestamp":620,"labels":654,"annotations":655},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":321},{"displayName":624,"slug":611,"cover":9,"description":625,"priority":106,"hideFromList":308,"preventParentPostCascadeQuery":308},{"permalink":627,"postCount":628,"visiblePostCount":628},[659,662],{"metadata":660,"spec":661},{"name":119},{"displayName":121,"slug":122},{"metadata":663,"spec":664},{"name":112},{"displayName":114,"slug":115},{"metadata":666,"spec":669,"status":676,"categories":680,"tags":687},{"name":667,"creationTimestamp":668},"post-jb-final-keyword-80890cb4","2026-09-13T10:00:54.018756Z",{"title":670,"slug":671,"cover":9,"excerpt":672,"publishTime":673,"categories":674,"tags":675,"priority":42,"pinned":308,"deleted":308,"visible":309,"allowComment":304},"final 关键字有哪些用法？","jb-final-keyword",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:54.080507Z",[611],[119,112],{"permalink":677,"excerpt":678,"lastModifyTime":679,"phase":314},"\u002Farchives\u002Fjb-final-keyword","一、修饰类 final 修饰的类不能被继承，如 String、Math。常用于工具类或不希望被扩展的类。 二、修饰方法 final 方法不能被子类重写，防止子类改变父类行为。构造方法隐式为 final。 三、修饰变量 成员变量：必须在声明时、构造方法或初始化块中赋值，赋值后不可改。 局部变量：使用前","2026-09-16T09:13:42.613292Z",[681],{"metadata":682,"spec":685,"status":686,"postCount":628},{"name":611,"creationTimestamp":620,"labels":683,"annotations":684},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":321},{"displayName":624,"slug":611,"cover":9,"description":625,"priority":106,"hideFromList":308,"preventParentPostCascadeQuery":308},{"permalink":627,"postCount":628,"visiblePostCount":628},[688,691],{"metadata":689,"spec":690},{"name":119},{"displayName":121,"slug":122},{"metadata":692,"spec":693},{"name":112},{"displayName":114,"slug":115},{"metadata":695,"spec":698,"status":705,"categories":709,"tags":716},{"name":696,"creationTimestamp":697},"post-jb-string-immutable-6381213f","2026-09-13T10:00:53.805615Z",{"title":699,"slug":700,"cover":9,"excerpt":701,"publishTime":702,"categories":703,"tags":704,"priority":42,"pinned":308,"deleted":308,"visible":309,"allowComment":304},"String 为什么是不可变的？","jb-string-immutable",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:53.873603Z",[611],[112,119],{"permalink":706,"excerpt":707,"lastModifyTime":708,"phase":314},"\u002Farchives\u002Fjb-string-immutable","一、不可变的体现 String 内部用 final char[]（JDK 9 后是 byte[]）存储字符，且没有提供修改内部数组的方法，一旦创建内容就不能改。所谓\"修改\"其实是创建新对象。 二、设计原因 字符串常量池复用：相同字面量共享同一对象，节省内存。 线程安全：不可变对象天然线程安全，多线程","2026-09-16T09:13:41.662582Z",[710],{"metadata":711,"spec":714,"status":715,"postCount":628},{"name":611,"creationTimestamp":620,"labels":712,"annotations":713},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":321},{"displayName":624,"slug":611,"cover":9,"description":625,"priority":106,"hideFromList":308,"preventParentPostCascadeQuery":308},{"permalink":627,"postCount":628,"visiblePostCount":628},[717,720],{"metadata":718,"spec":719},{"name":112},{"displayName":114,"slug":115},{"metadata":721,"spec":722},{"name":119},{"displayName":121,"slug":122},{"metadata":724,"spec":727,"status":734,"categories":738,"tags":745},{"name":725,"creationTimestamp":726},"post-jb-int-vs-integer-5ddd4c42","2026-09-13T10:00:53.622572Z",{"title":728,"slug":729,"cover":9,"excerpt":730,"publishTime":731,"categories":732,"tags":733,"priority":42,"pinned":308,"deleted":308,"visible":309,"allowComment":304},"int 和 Integer 有什么区别？","jb-int-vs-integer",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:53.684952Z",[611],[119,112],{"permalink":735,"excerpt":736,"lastModifyTime":737,"phase":314},"\u002Farchives\u002Fjb-int-vs-integer","一、本质区别 int 是 Java 的 8 种基本数据类型之一，直接存数值，占 4 字节，默认值 0。 Integer 是 int 的包装类，是对象，存的是指向堆中对象的引用，默认值 null。 二、自动装箱与拆箱 Integer a = 10;          \u002F\u002F 自动装箱：Integer.v","2026-09-16T09:13:40.094479Z",[739],{"metadata":740,"spec":743,"status":744,"postCount":628},{"name":611,"creationTimestamp":620,"labels":741,"annotations":742},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":321},{"displayName":624,"slug":611,"cover":9,"description":625,"priority":106,"hideFromList":308,"preventParentPostCascadeQuery":308},{"permalink":627,"postCount":628,"visiblePostCount":628},[746,749],{"metadata":747,"spec":748},{"name":119},{"displayName":121,"slug":122},{"metadata":750,"spec":751},{"name":112},{"displayName":114,"slug":115},{"metadata":753,"spec":756,"status":763,"categories":767,"tags":774},{"name":754,"creationTimestamp":755},"post-why-override-equals-and-hashcode-4d166dda","2026-09-13T09:11:40.565423Z",{"title":757,"slug":758,"cover":9,"excerpt":759,"publishTime":760,"categories":761,"tags":762,"priority":42,"pinned":308,"deleted":308,"visible":309,"allowComment":304},"为什么重写 equals 时一定要重写 hashCode？","why-override-equals-and-hashcode",{"raw":9,"autoGenerate":304},"2026-09-13T09:11:40.612965Z",[611],[112,119],{"permalink":764,"excerpt":765,"lastModifyTime":766,"phase":314},"\u002Farchives\u002Fwhy-override-equals-and-hashcode","一、先说结论 这是 Java 的通用约定：如果两个对象通过 equals 比较相等，那么它们的 hashCode 必须相同。只重写 equals 不重写 hashCode，会破坏这个约定，导致对象在 HashMap、HashSet 等集合中行为异常。 二、HashMap 的存取过程 HashMap ","2026-09-16T09:13:39.635536Z",[768],{"metadata":769,"spec":772,"status":773,"postCount":628},{"name":611,"creationTimestamp":620,"labels":770,"annotations":771},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":321},{"displayName":624,"slug":611,"cover":9,"description":625,"priority":106,"hideFromList":308,"preventParentPostCascadeQuery":308},{"permalink":627,"postCount":628,"visiblePostCount":628},[775,778],{"metadata":776,"spec":777},{"name":112},{"displayName":114,"slug":115},{"metadata":779,"spec":780},{"name":119},{"displayName":121,"slug":122},{"metadata":782,"spec":785,"status":792,"categories":796,"tags":803},{"name":783,"creationTimestamp":784},"post-string-stringbuilder-stringbuffer-0b7b9e93","2026-09-13T09:11:40.343284Z",{"title":786,"slug":787,"cover":9,"excerpt":788,"publishTime":789,"categories":790,"tags":791,"priority":42,"pinned":308,"deleted":308,"visible":309,"allowComment":304},"String、StringBuilder 和 StringBuffer 的区别？","string-stringbuilder-stringbuffer",{"raw":9,"autoGenerate":304},"2026-09-13T09:11:40.408558Z",[611],[119,112],{"permalink":793,"excerpt":794,"lastModifyTime":795,"phase":314},"\u002Farchives\u002Fstring-stringbuilder-stringbuffer","一、可变性不同 String 是不可变类，内部用 final 修饰字符数组。对字符串做拼接实际上会创建新的 String 对象。 StringBuilder 与 StringBuffer 都继承自 AbstractStringBuilder，内容可变，拼接时直接修改内部数组。 二、线程安全不同 St","2026-09-16T09:13:39.164827Z",[797],{"metadata":798,"spec":801,"status":802,"postCount":628},{"name":611,"creationTimestamp":620,"labels":799,"annotations":800},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":321},{"displayName":624,"slug":611,"cover":9,"description":625,"priority":106,"hideFromList":308,"preventParentPostCascadeQuery":308},{"permalink":627,"postCount":628,"visiblePostCount":628},[804,807],{"metadata":805,"spec":806},{"name":119},{"displayName":121,"slug":122},{"metadata":808,"spec":809},{"name":112},{"displayName":114,"slug":115},{"metadata":811,"spec":814,"status":821,"categories":825,"tags":832},{"name":812,"creationTimestamp":813},"post-double-equals-vs-equals-03a956b5","2026-09-13T09:11:40.146587Z",{"title":815,"slug":816,"cover":9,"excerpt":817,"publishTime":818,"categories":819,"tags":820,"priority":42,"pinned":308,"deleted":308,"visible":309,"allowComment":304},"== 和 equals 的区别是什么？","double-equals-vs-equals",{"raw":9,"autoGenerate":304},"2026-09-13T09:11:40.197516Z",[611],[112,119],{"permalink":822,"excerpt":823,"lastModifyTime":824,"phase":314},"\u002Farchives\u002Fdouble-equals-vs-equals","一、== 的作用 == 是 Java 的运算符，它的比较规则取决于两边的类型： 基本数据类型（byte、short、int、long、float、double、char、boolean）：比较的是字面值是否相等。 引用数据类型：比较的是两个引用是否指向堆中的同一个对象（即内存地址是否相同）。 int","2026-09-16T09:13:38.582777Z",[826],{"metadata":827,"spec":830,"status":831,"postCount":628},{"name":611,"creationTimestamp":620,"labels":828,"annotations":829},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":321},{"displayName":624,"slug":611,"cover":9,"description":625,"priority":106,"hideFromList":308,"preventParentPostCascadeQuery":308},{"permalink":627,"postCount":628,"visiblePostCount":628},[833,836],{"metadata":834,"spec":835},{"name":112},{"displayName":114,"slug":115},{"metadata":837,"spec":838},{"name":119},{"displayName":121,"slug":122}]