[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"site-config":3,"primary-menu":6,"category-java-basic":85,"first-post-java-basic":100,"posts-java-basic":272},{"config":4,"socialLinks":5},null,[],{"metadata":7,"spec":10,"menuItems":20},{"name":8,"creationTimestamp":9},"primary","2026-09-12T06:13:55.024154Z",{"displayName":11,"menuItems":12},"主菜单",[13,14,15,16,17,18,19],"88c3f10b-321c-4092-86a8-70db00251b74","menu-item-izrtmxer","c4c814d1-0c2c-456b-8c96-4864965fee94","menu-item-column","menu-item-tools","menu-item-zsxq","menu-item-ocrxlczu",[21,30,40,49,58,67,76],{"displayName":22,"metadata":23,"spec":25,"status":28,"children":29},"首页",{"name":13,"creationTimestamp":24},"2026-09-12T06:13:54.422830Z",{"displayName":22,"href":26,"priority":27,"menuName":8},"\u002F",0,{"displayName":22,"href":26},[],{"displayName":31,"metadata":32,"spec":34,"status":38,"children":39},"Java面试八股",{"name":14,"creationTimestamp":33},"2026-09-13T09:42:02.854891Z",{"displayName":31,"href":35,"target":36,"priority":37,"menuName":8},"\u002Fjava-interview","_self",1,{"displayName":31,"href":35},[],{"displayName":41,"metadata":42,"spec":44,"status":47,"children":48},"文章",{"name":15,"creationTimestamp":43},"2026-09-12T06:13:54.457307Z",{"displayName":41,"href":45,"priority":46,"menuName":8},"\u002Farchives",2,{"displayName":41,"href":45},[],{"displayName":50,"metadata":51,"spec":53,"status":56,"children":57},"项目实战",{"name":16,"creationTimestamp":52},"2026-09-14T00:35:08.138170Z",{"displayName":50,"href":54,"target":36,"priority":55,"menuName":8},"\u002Fcolumn",3,{"displayName":50,"href":54},[],{"displayName":59,"metadata":60,"spec":62,"status":65,"children":66},"在线工具",{"name":17,"creationTimestamp":61},"2026-09-14T00:35:08.171474Z",{"displayName":59,"href":63,"target":36,"priority":64,"menuName":8},"\u002Ftools",4,{"displayName":59,"href":63},[],{"displayName":68,"metadata":69,"spec":71,"status":74,"children":75},"知识星球",{"name":18,"creationTimestamp":70},"2026-09-14T00:35:08.199145Z",{"displayName":68,"href":72,"target":36,"priority":73,"menuName":8},"\u002Fzsxq",5,{"displayName":68,"href":72},[],{"displayName":77,"metadata":78,"spec":80,"status":83,"children":84},"特价云服务器",{"name":19,"creationTimestamp":79},"2026-09-25T15:30:59.201614Z",{"displayName":77,"href":81,"target":36,"priority":82,"menuName":8},"\u002Fserver",6,{"displayName":77,"href":81},[],{"metadata":86,"spec":91,"status":97,"postCount":99},{"name":87,"creationTimestamp":88,"labels":89},"java-basic","2026-09-13T09:13:25.495129Z",{"haloweb.section":90},"interview",{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},"Java 基础面试题","","Java 基础面试题：语言特性、面向对象、异常体系、泛型、反射与常用 API。",7,false,{"permalink":98,"postCount":99,"visiblePostCount":99},"\u002Fcategories\u002Fjava-basic",8,[101,125,146,167,188,209,230,251],{"metadata":102,"spec":105,"status":114,"categories":119},{"name":103,"creationTimestamp":104},"post-double-equals-vs-equals-03a956b5","2026-09-13T09:11:40.146587Z",{"title":106,"slug":107,"cover":93,"excerpt":108,"publishTime":110,"categories":111,"tags":112,"priority":27,"pinned":96,"deleted":96,"visible":113,"allowComment":109},"== 和 equals 的区别是什么？","double-equals-vs-equals",{"raw":93,"autoGenerate":109},true,"2026-09-13T09:11:40.197516Z",[87],[],"PUBLIC",{"permalink":115,"excerpt":116,"lastModifyTime":117,"phase":118},"\u002Farchives\u002Fdouble-equals-vs-equals","一、== 的作用 == 是 Java 的运算符，它的比较规则取决于两边的类型： 基本数据类型（byte、short、int、long、float、double、char、boolean）：比较的是字面值是否相等。 引用数据类型：比较的是两个引用是否指向堆中的同一个对象（即内存地址是否相同）。 int","2026-09-16T09:13:38.582777Z","PUBLISHED",[120],{"metadata":121,"spec":123,"status":124,"postCount":99},{"name":87,"creationTimestamp":88,"labels":122},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":99,"visiblePostCount":99},{"metadata":126,"spec":129,"status":136,"categories":140},{"name":127,"creationTimestamp":128},"post-string-stringbuilder-stringbuffer-0b7b9e93","2026-09-13T09:11:40.343284Z",{"title":130,"slug":131,"cover":93,"excerpt":132,"publishTime":133,"categories":134,"tags":135,"priority":27,"pinned":96,"deleted":96,"visible":113,"allowComment":109},"String、StringBuilder 和 StringBuffer 的区别？","string-stringbuilder-stringbuffer",{"raw":93,"autoGenerate":109},"2026-09-13T09:11:40.408558Z",[87],[],{"permalink":137,"excerpt":138,"lastModifyTime":139,"phase":118},"\u002Farchives\u002Fstring-stringbuilder-stringbuffer","一、可变性不同 String 是不可变类，内部用 final 修饰字符数组。对字符串做拼接实际上会创建新的 String 对象。 StringBuilder 与 StringBuffer 都继承自 AbstractStringBuilder，内容可变，拼接时直接修改内部数组。 二、线程安全不同 St","2026-09-16T09:13:39.164827Z",[141],{"metadata":142,"spec":144,"status":145,"postCount":99},{"name":87,"creationTimestamp":88,"labels":143},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":99,"visiblePostCount":99},{"metadata":147,"spec":150,"status":157,"categories":161},{"name":148,"creationTimestamp":149},"post-why-override-equals-and-hashcode-4d166dda","2026-09-13T09:11:40.565423Z",{"title":151,"slug":152,"cover":93,"excerpt":153,"publishTime":154,"categories":155,"tags":156,"priority":27,"pinned":96,"deleted":96,"visible":113,"allowComment":109},"为什么重写 equals 时一定要重写 hashCode？","why-override-equals-and-hashcode",{"raw":93,"autoGenerate":109},"2026-09-13T09:11:40.612965Z",[87],[],{"permalink":158,"excerpt":159,"lastModifyTime":160,"phase":118},"\u002Farchives\u002Fwhy-override-equals-and-hashcode","一、先说结论 这是 Java 的通用约定：如果两个对象通过 equals 比较相等，那么它们的 hashCode 必须相同。只重写 equals 不重写 hashCode，会破坏这个约定，导致对象在 HashMap、HashSet 等集合中行为异常。 二、HashMap 的存取过程 HashMap ","2026-09-16T09:13:39.635536Z",[162],{"metadata":163,"spec":165,"status":166,"postCount":99},{"name":87,"creationTimestamp":88,"labels":164},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":99,"visiblePostCount":99},{"metadata":168,"spec":171,"status":178,"categories":182},{"name":169,"creationTimestamp":170},"post-jb-int-vs-integer-5ddd4c42","2026-09-13T10:00:53.622572Z",{"title":172,"slug":173,"cover":93,"excerpt":174,"publishTime":175,"categories":176,"tags":177,"priority":27,"pinned":96,"deleted":96,"visible":113,"allowComment":109},"int 和 Integer 有什么区别？","jb-int-vs-integer",{"raw":93,"autoGenerate":109},"2026-09-13T10:00:53.684952Z",[87],[],{"permalink":179,"excerpt":180,"lastModifyTime":181,"phase":118},"\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",[183],{"metadata":184,"spec":186,"status":187,"postCount":99},{"name":87,"creationTimestamp":88,"labels":185},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":99,"visiblePostCount":99},{"metadata":189,"spec":192,"status":199,"categories":203},{"name":190,"creationTimestamp":191},"post-jb-string-immutable-6381213f","2026-09-13T10:00:53.805615Z",{"title":193,"slug":194,"cover":93,"excerpt":195,"publishTime":196,"categories":197,"tags":198,"priority":27,"pinned":96,"deleted":96,"visible":113,"allowComment":109},"String 为什么是不可变的？","jb-string-immutable",{"raw":93,"autoGenerate":109},"2026-09-13T10:00:53.873603Z",[87],[],{"permalink":200,"excerpt":201,"lastModifyTime":202,"phase":118},"\u002Farchives\u002Fjb-string-immutable","一、不可变的体现 String 内部用 final char[]（JDK 9 后是 byte[]）存储字符，且没有提供修改内部数组的方法，一旦创建内容就不能改。所谓\"修改\"其实是创建新对象。 二、设计原因 字符串常量池复用：相同字面量共享同一对象，节省内存。 线程安全：不可变对象天然线程安全，多线程","2026-09-16T09:13:41.662582Z",[204],{"metadata":205,"spec":207,"status":208,"postCount":99},{"name":87,"creationTimestamp":88,"labels":206},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":99,"visiblePostCount":99},{"metadata":210,"spec":213,"status":220,"categories":224},{"name":211,"creationTimestamp":212},"post-jb-final-keyword-80890cb4","2026-09-13T10:00:54.018756Z",{"title":214,"slug":215,"cover":93,"excerpt":216,"publishTime":217,"categories":218,"tags":219,"priority":27,"pinned":96,"deleted":96,"visible":113,"allowComment":109},"final 关键字有哪些用法？","jb-final-keyword",{"raw":93,"autoGenerate":109},"2026-09-13T10:00:54.080507Z",[87],[],{"permalink":221,"excerpt":222,"lastModifyTime":223,"phase":118},"\u002Farchives\u002Fjb-final-keyword","一、修饰类 final 修饰的类不能被继承，如 String、Math。常用于工具类或不希望被扩展的类。 二、修饰方法 final 方法不能被子类重写，防止子类改变父类行为。构造方法隐式为 final。 三、修饰变量 成员变量：必须在声明时、构造方法或初始化块中赋值，赋值后不可改。 局部变量：使用前","2026-09-16T09:13:42.613292Z",[225],{"metadata":226,"spec":228,"status":229,"postCount":99},{"name":87,"creationTimestamp":88,"labels":227},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":99,"visiblePostCount":99},{"metadata":231,"spec":234,"status":241,"categories":245},{"name":232,"creationTimestamp":233},"post-jb-overload-vs-override-76d8b85a","2026-09-13T10:00:54.236416Z",{"title":235,"slug":236,"cover":93,"excerpt":237,"publishTime":238,"categories":239,"tags":240,"priority":27,"pinned":96,"deleted":96,"visible":113,"allowComment":109},"重载（overload）和重写（override）的区别？","jb-overload-vs-override",{"raw":93,"autoGenerate":109},"2026-09-13T10:00:54.292575Z",[87],[],{"permalink":242,"excerpt":243,"lastModifyTime":244,"phase":118},"\u002Farchives\u002Fjb-overload-vs-override","一、定义 重载：同一个类中，方法名相同，参数列表（类型\u002F个数\u002F顺序）不同。与返回值无关。 重写：子类重新实现父类的方法，方法签名（名称、参数、返回值）必须一致。 二、对比 维度 重载 重写 位置 同类 父子类 参数列表 必须不同 必须相同 返回值 可不同 相同或协变 权限 可不同 不能更严格 绑定时","2026-09-16T09:13:41.019008Z",[246],{"metadata":247,"spec":249,"status":250,"postCount":99},{"name":87,"creationTimestamp":88,"labels":248},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":99,"visiblePostCount":99},{"metadata":252,"spec":255,"status":262,"categories":266},{"name":253,"creationTimestamp":254},"post-jb-interface-vs-abstract-de319222","2026-09-13T10:00:54.430321Z",{"title":256,"slug":257,"cover":93,"excerpt":258,"publishTime":259,"categories":260,"tags":261,"priority":27,"pinned":96,"deleted":96,"visible":113,"allowComment":109},"接口和抽象类有什么区别？","jb-interface-vs-abstract",{"raw":93,"autoGenerate":109},"2026-09-13T10:00:54.500384Z",[87],[],{"permalink":263,"excerpt":264,"lastModifyTime":265,"phase":118},"\u002Farchives\u002Fjb-interface-vs-abstract","一、核心区别 维度 抽象类 接口 关键字 abstract class interface 继承 单继承 多实现 构造方法 有 无 成员变量 任意 仅 public static final 方法实现 可有抽象\u002F具体方法 默认方法、静态方法（JDK 8+） 设计目的 \"is-a\" 共性抽取 \"can","2026-09-16T09:13:43.230261Z",[267],{"metadata":268,"spec":270,"status":271,"postCount":99},{"name":87,"creationTimestamp":88,"labels":269},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":99,"visiblePostCount":99},{"page":37,"size":273,"total":99,"items":274,"first":109,"last":109,"hasNext":96,"hasPrevious":96,"totalPages":37},100,[275,288,301,314,327,340,353,366],{"metadata":276,"spec":277,"status":281,"categories":282},{"name":253,"creationTimestamp":254},{"title":256,"slug":257,"cover":93,"excerpt":278,"publishTime":259,"categories":279,"tags":280,"priority":27,"pinned":96,"deleted":96,"visible":113,"allowComment":109},{"raw":93,"autoGenerate":109},[87],[],{"permalink":263,"excerpt":264,"lastModifyTime":265,"phase":118},[283],{"metadata":284,"spec":286,"status":287,"postCount":99},{"name":87,"creationTimestamp":88,"labels":285},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":99,"visiblePostCount":99},{"metadata":289,"spec":290,"status":294,"categories":295},{"name":232,"creationTimestamp":233},{"title":235,"slug":236,"cover":93,"excerpt":291,"publishTime":238,"categories":292,"tags":293,"priority":27,"pinned":96,"deleted":96,"visible":113,"allowComment":109},{"raw":93,"autoGenerate":109},[87],[],{"permalink":242,"excerpt":243,"lastModifyTime":244,"phase":118},[296],{"metadata":297,"spec":299,"status":300,"postCount":99},{"name":87,"creationTimestamp":88,"labels":298},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":99,"visiblePostCount":99},{"metadata":302,"spec":303,"status":307,"categories":308},{"name":211,"creationTimestamp":212},{"title":214,"slug":215,"cover":93,"excerpt":304,"publishTime":217,"categories":305,"tags":306,"priority":27,"pinned":96,"deleted":96,"visible":113,"allowComment":109},{"raw":93,"autoGenerate":109},[87],[],{"permalink":221,"excerpt":222,"lastModifyTime":223,"phase":118},[309],{"metadata":310,"spec":312,"status":313,"postCount":99},{"name":87,"creationTimestamp":88,"labels":311},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":99,"visiblePostCount":99},{"metadata":315,"spec":316,"status":320,"categories":321},{"name":190,"creationTimestamp":191},{"title":193,"slug":194,"cover":93,"excerpt":317,"publishTime":196,"categories":318,"tags":319,"priority":27,"pinned":96,"deleted":96,"visible":113,"allowComment":109},{"raw":93,"autoGenerate":109},[87],[],{"permalink":200,"excerpt":201,"lastModifyTime":202,"phase":118},[322],{"metadata":323,"spec":325,"status":326,"postCount":99},{"name":87,"creationTimestamp":88,"labels":324},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":99,"visiblePostCount":99},{"metadata":328,"spec":329,"status":333,"categories":334},{"name":169,"creationTimestamp":170},{"title":172,"slug":173,"cover":93,"excerpt":330,"publishTime":175,"categories":331,"tags":332,"priority":27,"pinned":96,"deleted":96,"visible":113,"allowComment":109},{"raw":93,"autoGenerate":109},[87],[],{"permalink":179,"excerpt":180,"lastModifyTime":181,"phase":118},[335],{"metadata":336,"spec":338,"status":339,"postCount":99},{"name":87,"creationTimestamp":88,"labels":337},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":99,"visiblePostCount":99},{"metadata":341,"spec":342,"status":346,"categories":347},{"name":148,"creationTimestamp":149},{"title":151,"slug":152,"cover":93,"excerpt":343,"publishTime":154,"categories":344,"tags":345,"priority":27,"pinned":96,"deleted":96,"visible":113,"allowComment":109},{"raw":93,"autoGenerate":109},[87],[],{"permalink":158,"excerpt":159,"lastModifyTime":160,"phase":118},[348],{"metadata":349,"spec":351,"status":352,"postCount":99},{"name":87,"creationTimestamp":88,"labels":350},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":99,"visiblePostCount":99},{"metadata":354,"spec":355,"status":359,"categories":360},{"name":127,"creationTimestamp":128},{"title":130,"slug":131,"cover":93,"excerpt":356,"publishTime":133,"categories":357,"tags":358,"priority":27,"pinned":96,"deleted":96,"visible":113,"allowComment":109},{"raw":93,"autoGenerate":109},[87],[],{"permalink":137,"excerpt":138,"lastModifyTime":139,"phase":118},[361],{"metadata":362,"spec":364,"status":365,"postCount":99},{"name":87,"creationTimestamp":88,"labels":363},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":99,"visiblePostCount":99},{"metadata":367,"spec":368,"status":372,"categories":373},{"name":103,"creationTimestamp":104},{"title":106,"slug":107,"cover":93,"excerpt":369,"publishTime":110,"categories":370,"tags":371,"priority":27,"pinned":96,"deleted":96,"visible":113,"allowComment":109},{"raw":93,"autoGenerate":109},[87],[],{"permalink":115,"excerpt":116,"lastModifyTime":117,"phase":118},[374],{"metadata":375,"spec":377,"status":378,"postCount":99},{"name":87,"creationTimestamp":88,"labels":376},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":99,"visiblePostCount":99}]