[{"data":1,"prerenderedAt":253},["ShallowReactive",2],{"tag-labels":3,"site-header":4,"article-java-switch-en":72},{},{"featuredPost":5,"navigations":29},{"id":6,"title":7,"title_id":8,"slug":9,"excerpt":10,"excerpt_id":11,"has_translation":12,"published_at":13,"reading_time":14,"hidden_from_listing":15,"tags":16,"thumbnail_image":21,"og_image":22,"series":23,"authors":28},110,"When You Pick a Framework Just to Look Different","Ketika Pilih Framework Cuma Biar Kelihatan Beda","ketika-pilih-framework-cuma-biar-kelihatan-beda","The last time you chose a new framework or library, was it because your problem needed that tool, or because it sounded cool and few people around you were using it? That question is uncomfortable. Technology decisions are often made for reasons that never appear in any technical document.","Terakhir kali kamu milih framework atau library baru, itu karena masalahmu butuh alat itu, atau karena alatnya kedengaran keren dan belum banyak yang pakai? Pertanyaan ini nggak enak dijawab. Soalnya keputusan teknologi sering diambil dengan alasan yang nggak pernah ditulis di dokumen teknis mana pun.",true,"2026-10-06T15:25:21.000Z",5,false,[17,18,19,20],"karier","framework","opini","pengalaman",null,"\u002Fog\u002Fketika-pilih-framework-cuma-biar-kelihatan-beda.png",{"id":24,"title":25,"title_id":26,"slug":27},9,"Articles","Artikel","all",[],[30,46,67],{"collection":31,"item":32},"series",{"__typename":31,"title":25,"title_id":26,"slug":27,"children_series":33},[34,38,42],{"title":35,"title_id":36,"slug":37},"Artificial Intelligence","Kecerdasan Artifisial","kecerdasan-artifisial",{"title":39,"title_id":40,"slug":41},"Programming Fundamentals","Konsep Dasar Pemrograman","konsep-dasar-pemrograman",{"title":43,"title_id":44,"slug":45},"Algorithms and Data Structures","Algoritma dan Struktur Data","algoritma-struktur-data",{"collection":31,"item":47},{"__typename":31,"title":48,"title_id":48,"slug":49,"children_series":50},"Tutorial","tutorial",[51,55,59,63],{"title":52,"title_id":53,"slug":54},"Learning Python","Belajar Python","belajar-python",{"title":56,"title_id":57,"slug":58},"Learning Go","Belajar Golang","belajar-golang",{"title":60,"title_id":61,"slug":62},"Learning Java","Belajar Java","belajar-java",{"title":64,"title_id":65,"slug":66},"Learning Pascal","Belajar Pascal","belajar-pascal",{"collection":31,"item":68},{"__typename":31,"title":69,"title_id":69,"slug":70,"children_series":71},"Lab","lab",[],{"article":73,"renderedBody":145,"renderedTakeaway":146,"latestArticles":147,"toc":233},{"id":74,"title":75,"title_id":76,"slug":77,"excerpt":78,"excerpt_id":79,"has_translation":12,"published_at":80,"reading_time":81,"hidden_from_listing":15,"tags":82,"thumbnail_image":21,"og_image":85,"series":86,"authors":137,"seoTitle":21,"seoDescription":21,"body_locale":140,"available_locales":141,"body":143,"takeway":144,"prerequisite":21},149,"Java switch: the 78 That Came Out as a C","Java switch: 78 yang Keluar sebagai C","java-switch","A grading program marks a paper 78 and prints `grade: C`. `case 7` assigns `B` and then runs into `case 6` because the `break` is missing, and the compiler says nothing about it.","Sebuah program penilaian memberi nilai 78 pada satu lembar ujian lalu mencetak `grade: C`. `case 7` memberi `B` lalu jatuh ke `case 6` karena `break`-nya hilang, dan kompilator tidak mengatakan apa pun soal itu.","2026-11-12T01:00:00.000Z",6,[83,84],"java","percabangan","\u002Fog\u002Fjava-switch.png",{"id":87,"title":60,"title_id":61,"slug":62,"description":88,"description_id":89,"articles":90,"children_series":115,"parent_series":128},13,"Java is one of the most used languages in the world. It earned that with how it handles large applications and how stable it stays over the years. You'll find it in web apps, mobile apps, and enterprise systems alike. Start here and take it one step at a time.","Java adalah bahasa pemrograman yang sangat populer dan banyak digunakan di seluruh dunia. Dikenal karena kekuatannya dalam pengembangan aplikasi besar dan stabilitasnya, Java dipakai untuk berbagai macam aplikasi seperti aplikasi web, mobile, dan enterprise. Yuk mulai belajar Java bareng Inva!",[91,100],{"id":74,"title":75,"title_id":76,"slug":77,"excerpt":78,"excerpt_id":79,"has_translation":12,"published_at":80,"reading_time":81,"hidden_from_listing":15,"tags":82,"thumbnail_image":21,"og_image":85,"series":92,"authors":93},{"id":87,"title":60,"title_id":61,"slug":62},[94],{"authors_id":95},{"id":96,"name":97,"slug":98,"role":99,"profile_picture":21},1,"Daffa Izzuddin","izzudd","Writer",{"id":101,"title":102,"title_id":103,"slug":104,"excerpt":105,"excerpt_id":106,"has_translation":12,"published_at":107,"reading_time":81,"hidden_from_listing":15,"tags":108,"thumbnail_image":21,"og_image":110,"series":111,"authors":112},150,"Java Loops: the Last Price That Never Reached the Sum","Loop Java: Harga Terakhir yang Tidak Pernah Masuk ke Total","java-loops","Four prices add up to 47000, and the cart program prints 36500. The bound is `prices.length - 1`, so the last item is never read while the average is still divided by four.","Empat harga berjumlah 47000, tapi program keranjang mencetak 36500. Batasnya `prices.length - 1`, jadi item terakhir tidak pernah dibaca sementara rata-ratanya tetap dibagi empat.","2026-11-13T01:00:00.000Z",[83,109],"loop","\u002Fog\u002Fjava-loops.png",{"id":87,"title":60,"title_id":61,"slug":62},[113],{"authors_id":114},{"id":96,"name":97,"slug":98,"role":99,"profile_picture":21},[116,122],{"id":117,"title":118,"title_id":119,"slug":120,"description":121,"cover_image":21},21,"Getting Started with Java","Berkenalan dengan Java","java-intro","Meet Java from scratch: your first program, how the pieces fit together, and how to read input and print output.",{"id":123,"title":124,"title_id":125,"slug":126,"description":127,"cover_image":21},22,"Variables, Types, and Operations","Variabel, Tipe Data, dan Operasi","java-variabel-tipe-data","In Java the type has to be clear from the start. We go through the primitive types, then integers and floats in more depth.",{"id":96,"title":48,"title_id":48,"slug":49,"parent_series":21,"children_series":129},[130,132,134,135],{"id":131,"title":52,"title_id":53,"slug":54,"cover_image":21},10,{"id":133,"title":56,"title_id":57,"slug":58,"cover_image":21},11,{"id":87,"title":60,"title_id":61,"slug":62,"cover_image":21},{"id":136,"title":64,"title_id":65,"slug":66,"cover_image":21},14,[138],{"authors_id":139},{"id":96,"name":97,"slug":98,"role":99,"profile_picture":21},"en",[140,142],"id","\nYou mark a paper 78 and your grading program prints a C. The line above the grade says `score: 78`, so the input is right. The grade is one step too low, though. The run ended normally, with exit status 0, no compiler warning and no runtime error. Nothing in the terminal points at the program.\n\n## The program that prints C\n\nThe file holds a single class with one `int` score and a `switch` on `score \u002F 10`. Each case picks a letter for one band of scores, and `default` handles everything else.\n\n```java\n\u002F\u002F Grade.java\npublic class Grade {\n    public static void main(String[] args) {\n        int score = 78;\n        String grade;\n        switch (score \u002F 10) {\n            case 10:\n            case 9:\n                grade = \"A\";\n                break;\n            case 8:\n                grade = \"B\";\n                break;\n            case 7:\n                grade = \"B\";\n            case 6:\n                grade = \"C\";\n                break;\n            default:\n                grade = \"D\";\n        }\n        System.out.println(\"score: \" + score);\n        System.out.println(\"grade: \" + grade);\n    }\n}\n```\n\nCompile and run it with the command below.\n\n```plain\n$ javac Grade.java && java Grade\nscore: 78\ngrade: C\n```\n\nThe score line is right. Since `score` is an `int`, `78 \u002F 10` is integer division and gives `7`, so the switch enters `case 7`. Read that case in the source and it looks correct, because it assigns `B`. Nothing in the output says which case ran or what it did. You get only the final letter, and the final letter is wrong.\n\n## What break actually does\n\nWithout a `break`, control does not leave the switch at the end of a case. It runs on into the statements of the next case instead. Here `case 7` assigns `B`, then control continues into `case 6`, which overwrites it with `C`. The `break` after `case 6` is the first one that stops the run.\n\nThe top of the switch uses the same behavior on purpose. `case 10:` has no statements and no `break`, so it falls into `case 9:`, and both labels share one `A`. Falling through is a tool when you write it deliberately. It is a bug when you only forgot to stop it.\n\nThe compiler stays silent about the difference. Both versions are legal Java, so the program compiled, ran, and exited with status 0. You have to notice the missing `break` yourself, or find a way to make the output speak up.\n\n## A check you can run\n\nThe checker reads the two lines the program prints and compares them against what the grade should be for 78. It counts the passes, reports any line that does not match, and flags an extra line.\n\n```java\n\u002F\u002F CheckGrade.java\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class CheckGrade {\n    public static void main(String[] args) {\n        List\u003CString> expected = List.of(\"score: 78\", \"grade: B\");\n        Scanner in = new Scanner(System.in);\n        int passed = 0;\n        for (int i = 0; i \u003C expected.size(); i++) {\n            String got = in.hasNextLine() ? in.nextLine() : \"\u003Cnothing>\";\n            if (got.equals(expected.get(i))) {\n                passed++;\n                System.out.println(\"PASS  line \" + (i + 1) + \": \" + got);\n            } else {\n                System.out.println(\"FAIL  line \" + (i + 1) + \": expected \" + expected.get(i) + \", got \" + got);\n            }\n        }\n        if (in.hasNextLine()) {\n            System.out.println(\"FAIL  extra line: \" + in.nextLine());\n        }\n        System.out.println();\n        System.out.println(passed + \" of \" + expected.size() + \" checks passed\");\n        if (passed != expected.size()) {\n            System.exit(1);\n        }\n    }\n}\n```\n\nCompile it and pipe the program into it with this command.\n\n```plain\n$ javac CheckGrade.java && java Grade | java CheckGrade\nPASS  line 1: score: 78\nFAIL  line 2: expected grade: B, got grade: C\n\n1 of 2 checks passed\n```\n\nOnly the first line passes. The second line is the whole bug: the checker wanted `grade: B` and got `grade: C`. The checker also exits with status 1 until both lines pass, so the failure is visible to anything that reads the exit status.\n\n## The form that cannot fall through\n\nJava 14 added the arrow form of `switch`, and it is a standard feature in the Java 21 used here. Each `->` arm holds one outcome, and there is no statement under it to fall into. The same program in that form looks like this.\n\n```java\n\u002F\u002F Grade.java\npublic class Grade {\n    public static void main(String[] args) {\n        int score = 78;\n        String grade = switch (score \u002F 10) {\n            case 10, 9 -> \"A\";\n            case 8, 7 -> \"B\";\n            case 6 -> \"C\";\n            default -> \"D\";\n        };\n        System.out.println(\"score: \" + score);\n        System.out.println(\"grade: \" + grade);\n    }\n}\n```\n\nCompile and run it.\n\n```plain\n$ javac Grade.java && java Grade\nscore: 78\ngrade: B\n```\n\nThen run the same checker against it.\n\n```plain\n$ java Grade | java CheckGrade\nPASS  line 1: score: 78\nPASS  line 2: grade: B\n\n2 of 2 checks passed\n```\n\nThree things changed. Each `->` arm produces one outcome. One arm can carry several labels, as in `case 10, 9 -> \"A\";`. And there is no way to fall into the next arm, so the mistake from the first version cannot be written here.\n\n## When the boundary is not a multiple of ten\n\nThe arrow form removes fall-through, but it does not change the arithmetic. `score \u002F 10` puts 89 and 80 in the same bucket, because both divide to `8`. The arrow version prints `grade: B` for a score of 89. A rule that says 85 and up is an A cannot be written as a case on `score \u002F 10`. An `if` chain with `score >= 85` states that rule directly, as the next program does with the score set to 89.\n\n```java\n\u002F\u002F GradeIf.java\npublic class GradeIf {\n    public static void main(String[] args) {\n        int score = 89;\n        String grade;\n        if (score >= 85) {\n            grade = \"A\";\n        } else if (score >= 70) {\n            grade = \"B\";\n        } else if (score >= 60) {\n            grade = \"C\";\n        } else {\n            grade = \"D\";\n        }\n        System.out.println(\"score: \" + score);\n        System.out.println(\"grade: \" + grade);\n    }\n}\n```\n\n```plain\n$ javac GradeIf.java && java GradeIf\nscore: 89\ngrade: A\n```\n\nThat is an A for the same 89 the arrow switch graded as a B. The two constructs answer different questions when the boundary is not a multiple of ten. Choose `switch` when the values are discrete and few. Choose `if` when the rule is a threshold.\n\n## Before the next article\n\nOpen the fixed file and change `int score = 78;` to `95`. Run it and pipe it into the same checker, unchanged.\n\nYou will see `score: 95` and `grade: A`, which is the right grade for 95. The checker still reports `0 of 2 checks passed`, because it expects `score: 78`. Its input is fixed, so it certifies one input and not the rule.\n\nIf a test only ever feeds one score, which part of the grading rule is still unproven?\n","- `switch` leaves a case only when it reaches a `break`, so a missing `break` runs the next case's statements too.\n- In the starter, `case 7` assigns `B` and `case 6` overwrites it with `C`, so a score of 78 prints `grade: C`.\n- Grouped labels like `case 10:` and `case 9:` fall through on purpose, which is the same mechanism used deliberately.\n- The arrow form (`case 8, 7 -> \"B\";`) arrived in Java 14 and cannot fall through, because an arm has no statements to fall into.\n- `score \u002F 10` puts 89 and 80 in one bucket, so a threshold rule such as 85 and up needs an `if` chain, not a `switch`.\n- A checker with a fixed input certifies one score, not the grading rule: feed it 95 and it reports `0 of 2 checks passed`.","\u003Cp>You mark a paper 78 and your grading program prints a C. The line above the grade says \u003Ccode>score: 78\u003C\u002Fcode>, so the input is right. The grade is one step too low, though. The run ended normally, with exit status 0, no compiler warning and no runtime error. Nothing in the terminal points at the program.\u003C\u002Fp>\n\u003Ch2 id=\"the-program-that-prints-c\">The program that prints C\u003C\u002Fh2>\n\u003Cp>The file holds a single class with one \u003Ccode>int\u003C\u002Fcode> score and a \u003Ccode>switch\u003C\u002Fcode> on \u003Ccode>score \u002F 10\u003C\u002Fcode>. Each case picks a letter for one band of scores, and \u003Ccode>default\u003C\u002Fcode> handles everything else.\u003C\u002Fp>\n\n\u003Cdiv class=\"code-block-wrapper my-6 not-prose rounded-xl border-2 border-black dark:border-gray-600 shadow-neo overflow-hidden bg-[#24292e] text-[#e1e4e8] transition-all\">\n  \u003Cdiv class=\"code-block-header flex items-center justify-between px-4 py-2.5 bg-[#1f2428] border-b-2 border-black dark:border-gray-600 font-mono text-xs font-bold text-gray-300 select-none\">\n    \u003Cdiv class=\"flex items-center gap-2\">\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#ff5f56] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#ffbd2e] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#27c93f] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"ml-2 font-mono font-bold text-xs uppercase tracking-wider text-gray-300\">JAVA\u003C\u002Fspan>\n    \u003C\u002Fdiv>\n    \u003Cbutton type=\"button\" class=\"copy-code-btn flex items-center gap-1.5 px-3 py-1 text-xs font-bold bg-[#2f363d] text-gray-200 border-2 border-black dark:border-gray-500 rounded-lg shadow-neo-sm hover:translate-x-0.5 hover:translate-y-0.5 hover:shadow-none hover:bg-gray-700 transition-all cursor-pointer\" data-code=\"%2F%2F%20Grade.java%0Apublic%20class%20Grade%20%7B%0A%20%20%20%20public%20static%20void%20main(String%5B%5D%20args)%20%7B%0A%20%20%20%20%20%20%20%20int%20score%20%3D%2078%3B%0A%20%20%20%20%20%20%20%20String%20grade%3B%0A%20%20%20%20%20%20%20%20switch%20(score%20%2F%2010)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20case%2010%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20case%209%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20grade%20%3D%20%22A%22%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20case%208%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20grade%20%3D%20%22B%22%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20case%207%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20grade%20%3D%20%22B%22%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20case%206%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20grade%20%3D%20%22C%22%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20default%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20grade%20%3D%20%22D%22%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20System.out.println(%22score%3A%20%22%20%2B%20score)%3B%0A%20%20%20%20%20%20%20%20System.out.println(%22grade%3A%20%22%20%2B%20grade)%3B%0A%20%20%20%20%7D%0A%7D\" title=\"Copy\">\n      \u003Csvg class=\"w-3.5 h-3.5 copy-icon-svg\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n        \u003Cpath stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Cspan class=\"copy-text\">Copy\u003C\u002Fspan>\n    \u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n  \u003Cdiv class=\"code-block-content p-4 overflow-x-auto text-sm font-mono leading-relaxed bg-[#24292e]\">\n    \u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">\u002F\u002F Grade.java\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">public\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> class\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> Grade\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">    public\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> static\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> void\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> main\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">String\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">[] \u003C\u002Fspan>\u003Cspan style=\"color:#FFAB70\">args\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">        int\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> score \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 78\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        String grade;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">        switch\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> (score \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">\u002F\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 10\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">            case\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 10\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">:\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">            case\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 9\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">:\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">                grade \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \"A\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">                break\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">            case\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 8\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">:\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">                grade \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \"B\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">                break\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">            case\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 7\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">:\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">                grade \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \"B\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">            case\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 6\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">:\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">                grade \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \"C\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">                break\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">            default:\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">                grade \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \"D\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        System.out.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">println\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"score: \"\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> +\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> score);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        System.out.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">println\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"grade: \"\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> +\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> grade);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\u003Cp>Compile and run it with the command below.\u003C\u002Fp>\n\n\u003Cdiv class=\"code-block-wrapper code-output my-6 not-prose rounded-xl border-2 border-black dark:border-gray-600 shadow-neo overflow-hidden text-[#e1e4e8] transition-all\" data-output-block>\n  \u003Cdiv class=\"code-block-header flex items-center justify-between px-4 py-2.5 bg-[#1f2428] border-b-2 border-black dark:border-gray-600 font-mono text-xs font-bold text-gray-300 select-none\">\n    \u003Cdiv class=\"flex items-center gap-2\">\n      \u003Cspan class=\"code-output-mark\" aria-hidden=\"true\">&gt;_\u003C\u002Fspan>\n      \u003Cspan class=\"ml-1 font-mono font-bold text-xs uppercase tracking-wider text-gray-300\">Output\u003C\u002Fspan>\n    \u003C\u002Fdiv>\n    \u003Cbutton type=\"button\" class=\"copy-code-btn flex items-center gap-1.5 px-3 py-1 text-xs font-bold bg-[#2f363d] text-gray-200 border-2 border-black dark:border-gray-500 rounded-lg shadow-neo-sm hover:translate-x-0.5 hover:translate-y-0.5 hover:shadow-none hover:bg-gray-700 transition-all cursor-pointer\" data-code=\"%24%20javac%20Grade.java%20%26%26%20java%20Grade%0Ascore%3A%2078%0Agrade%3A%20C\" title=\"Copy\">\n      \u003Csvg class=\"w-3.5 h-3.5 copy-icon-svg\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n        \u003Cpath stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Cspan class=\"copy-text\">Copy\u003C\u002Fspan>\n    \u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n  \u003Cdiv class=\"code-block-content p-4 overflow-x-auto text-sm font-mono leading-relaxed\">\n    \u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\">\u003Ccode>\u003Cspan class=\"code-output-cmd\">$ javac Grade.java &amp;&amp; java Grade\u003C\u002Fspan>\nscore: 78\ngrade: C\u003C\u002Fcode>\u003C\u002Fpre>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\u003Cp>The score line is right. Since \u003Ccode>score\u003C\u002Fcode> is an \u003Ccode>int\u003C\u002Fcode>, \u003Ccode>78 \u002F 10\u003C\u002Fcode> is integer division and gives \u003Ccode>7\u003C\u002Fcode>, so the switch enters \u003Ccode>case 7\u003C\u002Fcode>. Read that case in the source and it looks correct, because it assigns \u003Ccode>B\u003C\u002Fcode>. Nothing in the output says which case ran or what it did. You get only the final letter, and the final letter is wrong.\u003C\u002Fp>\n\u003Ch2 id=\"what-break-actually-does\">What break actually does\u003C\u002Fh2>\n\u003Cp>Without a \u003Ccode>break\u003C\u002Fcode>, control does not leave the switch at the end of a case. It runs on into the statements of the next case instead. Here \u003Ccode>case 7\u003C\u002Fcode> assigns \u003Ccode>B\u003C\u002Fcode>, then control continues into \u003Ccode>case 6\u003C\u002Fcode>, which overwrites it with \u003Ccode>C\u003C\u002Fcode>. The \u003Ccode>break\u003C\u002Fcode> after \u003Ccode>case 6\u003C\u002Fcode> is the first one that stops the run.\u003C\u002Fp>\n\u003Cp>The top of the switch uses the same behavior on purpose. \u003Ccode>case 10:\u003C\u002Fcode> has no statements and no \u003Ccode>break\u003C\u002Fcode>, so it falls into \u003Ccode>case 9:\u003C\u002Fcode>, and both labels share one \u003Ccode>A\u003C\u002Fcode>. Falling through is a tool when you write it deliberately. It is a bug when you only forgot to stop it.\u003C\u002Fp>\n\u003Cp>The compiler stays silent about the difference. Both versions are legal Java, so the program compiled, ran, and exited with status 0. You have to notice the missing \u003Ccode>break\u003C\u002Fcode> yourself, or find a way to make the output speak up.\u003C\u002Fp>\n\u003Ch2 id=\"a-check-you-can-run\">A check you can run\u003C\u002Fh2>\n\u003Cp>The checker reads the two lines the program prints and compares them against what the grade should be for 78. It counts the passes, reports any line that does not match, and flags an extra line.\u003C\u002Fp>\n\n\u003Cdiv class=\"code-block-wrapper my-6 not-prose rounded-xl border-2 border-black dark:border-gray-600 shadow-neo overflow-hidden bg-[#24292e] text-[#e1e4e8] transition-all\">\n  \u003Cdiv class=\"code-block-header flex items-center justify-between px-4 py-2.5 bg-[#1f2428] border-b-2 border-black dark:border-gray-600 font-mono text-xs font-bold text-gray-300 select-none\">\n    \u003Cdiv class=\"flex items-center gap-2\">\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#ff5f56] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#ffbd2e] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#27c93f] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"ml-2 font-mono font-bold text-xs uppercase tracking-wider text-gray-300\">JAVA\u003C\u002Fspan>\n    \u003C\u002Fdiv>\n    \u003Cbutton type=\"button\" class=\"copy-code-btn flex items-center gap-1.5 px-3 py-1 text-xs font-bold bg-[#2f363d] text-gray-200 border-2 border-black dark:border-gray-500 rounded-lg shadow-neo-sm hover:translate-x-0.5 hover:translate-y-0.5 hover:shadow-none hover:bg-gray-700 transition-all cursor-pointer\" data-code=\"%2F%2F%20CheckGrade.java%0Aimport%20java.util.List%3B%0Aimport%20java.util.Scanner%3B%0A%0Apublic%20class%20CheckGrade%20%7B%0A%20%20%20%20public%20static%20void%20main(String%5B%5D%20args)%20%7B%0A%20%20%20%20%20%20%20%20List%3CString%3E%20expected%20%3D%20List.of(%22score%3A%2078%22%2C%20%22grade%3A%20B%22)%3B%0A%20%20%20%20%20%20%20%20Scanner%20in%20%3D%20new%20Scanner(System.in)%3B%0A%20%20%20%20%20%20%20%20int%20passed%20%3D%200%3B%0A%20%20%20%20%20%20%20%20for%20(int%20i%20%3D%200%3B%20i%20%3C%20expected.size()%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20String%20got%20%3D%20in.hasNextLine()%20%3F%20in.nextLine()%20%3A%20%22%3Cnothing%3E%22%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(got.equals(expected.get(i)))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20passed%2B%2B%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20System.out.println(%22PASS%20%20line%20%22%20%2B%20(i%20%2B%201)%20%2B%20%22%3A%20%22%20%2B%20got)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20System.out.println(%22FAIL%20%20line%20%22%20%2B%20(i%20%2B%201)%20%2B%20%22%3A%20expected%20%22%20%2B%20expected.get(i)%20%2B%20%22%2C%20got%20%22%20%2B%20got)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20if%20(in.hasNextLine())%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20System.out.println(%22FAIL%20%20extra%20line%3A%20%22%20%2B%20in.nextLine())%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20System.out.println()%3B%0A%20%20%20%20%20%20%20%20System.out.println(passed%20%2B%20%22%20of%20%22%20%2B%20expected.size()%20%2B%20%22%20checks%20passed%22)%3B%0A%20%20%20%20%20%20%20%20if%20(passed%20!%3D%20expected.size())%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20System.exit(1)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%7D\" title=\"Copy\">\n      \u003Csvg class=\"w-3.5 h-3.5 copy-icon-svg\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n        \u003Cpath stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Cspan class=\"copy-text\">Copy\u003C\u002Fspan>\n    \u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n  \u003Cdiv class=\"code-block-content p-4 overflow-x-auto text-sm font-mono leading-relaxed bg-[#24292e]\">\n    \u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">\u002F\u002F CheckGrade.java\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">import\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> java.util.List;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">import\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> java.util.Scanner;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">public\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> class\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> CheckGrade\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">    public\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> static\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> void\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> main\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">String\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">[] \u003C\u002Fspan>\u003Cspan style=\"color:#FFAB70\">args\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        List&#x3C;\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">String\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">> expected \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> List.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">of\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"score: 78\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"grade: B\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        Scanner in \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> new\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> Scanner\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(System.in);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">        int\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> passed \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 0\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">        for\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> (\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">int\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> i \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 0\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">; i \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">&#x3C;\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> expected.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">size\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(); i\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">++\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">            String got \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> in.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">hasNextLine\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">() \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">?\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> in.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">nextLine\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">() \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">:\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \"&#x3C;nothing>\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">            if\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> (got.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">equals\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(expected.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">get\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(i))) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">                passed\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">++\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">                System.out.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">println\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"PASS  line \"\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> +\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> (i \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">+\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 1\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">+\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \": \"\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> +\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> got);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">            } \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">else\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">                System.out.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">println\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"FAIL  line \"\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> +\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> (i \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">+\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 1\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">+\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \": expected \"\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> +\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> expected.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">get\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(i) \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">+\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \", got \"\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> +\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> got);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">            }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">        if\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> (in.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">hasNextLine\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">()) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">            System.out.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">println\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"FAIL  extra line: \"\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> +\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> in.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">nextLine\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">());\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        System.out.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">println\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">();\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        System.out.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">println\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(passed \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">+\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \" of \"\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> +\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> expected.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">size\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">() \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">+\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \" checks passed\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">        if\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> (passed \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">!=\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> expected.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">size\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">()) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">            System.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">exit\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\">1\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\u003Cp>Compile it and pipe the program into it with this command.\u003C\u002Fp>\n\n\u003Cdiv class=\"code-block-wrapper code-output my-6 not-prose rounded-xl border-2 border-black dark:border-gray-600 shadow-neo overflow-hidden text-[#e1e4e8] transition-all\" data-output-block>\n  \u003Cdiv class=\"code-block-header flex items-center justify-between px-4 py-2.5 bg-[#1f2428] border-b-2 border-black dark:border-gray-600 font-mono text-xs font-bold text-gray-300 select-none\">\n    \u003Cdiv class=\"flex items-center gap-2\">\n      \u003Cspan class=\"code-output-mark\" aria-hidden=\"true\">&gt;_\u003C\u002Fspan>\n      \u003Cspan class=\"ml-1 font-mono font-bold text-xs uppercase tracking-wider text-gray-300\">Output\u003C\u002Fspan>\n    \u003C\u002Fdiv>\n    \u003Cbutton type=\"button\" class=\"copy-code-btn flex items-center gap-1.5 px-3 py-1 text-xs font-bold bg-[#2f363d] text-gray-200 border-2 border-black dark:border-gray-500 rounded-lg shadow-neo-sm hover:translate-x-0.5 hover:translate-y-0.5 hover:shadow-none hover:bg-gray-700 transition-all cursor-pointer\" data-code=\"%24%20javac%20CheckGrade.java%20%26%26%20java%20Grade%20%7C%20java%20CheckGrade%0APASS%20%20line%201%3A%20score%3A%2078%0AFAIL%20%20line%202%3A%20expected%20grade%3A%20B%2C%20got%20grade%3A%20C%0A%0A1%20of%202%20checks%20passed\" title=\"Copy\">\n      \u003Csvg class=\"w-3.5 h-3.5 copy-icon-svg\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n        \u003Cpath stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Cspan class=\"copy-text\">Copy\u003C\u002Fspan>\n    \u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n  \u003Cdiv class=\"code-block-content p-4 overflow-x-auto text-sm font-mono leading-relaxed\">\n    \u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\">\u003Ccode>\u003Cspan class=\"code-output-cmd\">$ javac CheckGrade.java &amp;&amp; java Grade | java CheckGrade\u003C\u002Fspan>\nPASS  line 1: score: 78\nFAIL  line 2: expected grade: B, got grade: C\n\n1 of 2 checks passed\u003C\u002Fcode>\u003C\u002Fpre>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\u003Cp>Only the first line passes. The second line is the whole bug: the checker wanted \u003Ccode>grade: B\u003C\u002Fcode> and got \u003Ccode>grade: C\u003C\u002Fcode>. The checker also exits with status 1 until both lines pass, so the failure is visible to anything that reads the exit status.\u003C\u002Fp>\n\u003Ch2 id=\"the-form-that-cannot-fall-through\">The form that cannot fall through\u003C\u002Fh2>\n\u003Cp>Java 14 added the arrow form of \u003Ccode>switch\u003C\u002Fcode>, and it is a standard feature in the Java 21 used here. Each \u003Ccode>-&gt;\u003C\u002Fcode> arm holds one outcome, and there is no statement under it to fall into. The same program in that form looks like this.\u003C\u002Fp>\n\n\u003Cdiv class=\"code-block-wrapper my-6 not-prose rounded-xl border-2 border-black dark:border-gray-600 shadow-neo overflow-hidden bg-[#24292e] text-[#e1e4e8] transition-all\">\n  \u003Cdiv class=\"code-block-header flex items-center justify-between px-4 py-2.5 bg-[#1f2428] border-b-2 border-black dark:border-gray-600 font-mono text-xs font-bold text-gray-300 select-none\">\n    \u003Cdiv class=\"flex items-center gap-2\">\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#ff5f56] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#ffbd2e] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#27c93f] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"ml-2 font-mono font-bold text-xs uppercase tracking-wider text-gray-300\">JAVA\u003C\u002Fspan>\n    \u003C\u002Fdiv>\n    \u003Cbutton type=\"button\" class=\"copy-code-btn flex items-center gap-1.5 px-3 py-1 text-xs font-bold bg-[#2f363d] text-gray-200 border-2 border-black dark:border-gray-500 rounded-lg shadow-neo-sm hover:translate-x-0.5 hover:translate-y-0.5 hover:shadow-none hover:bg-gray-700 transition-all cursor-pointer\" data-code=\"%2F%2F%20Grade.java%0Apublic%20class%20Grade%20%7B%0A%20%20%20%20public%20static%20void%20main(String%5B%5D%20args)%20%7B%0A%20%20%20%20%20%20%20%20int%20score%20%3D%2078%3B%0A%20%20%20%20%20%20%20%20String%20grade%20%3D%20switch%20(score%20%2F%2010)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20case%2010%2C%209%20-%3E%20%22A%22%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20case%208%2C%207%20-%3E%20%22B%22%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20case%206%20-%3E%20%22C%22%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20default%20-%3E%20%22D%22%3B%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20System.out.println(%22score%3A%20%22%20%2B%20score)%3B%0A%20%20%20%20%20%20%20%20System.out.println(%22grade%3A%20%22%20%2B%20grade)%3B%0A%20%20%20%20%7D%0A%7D\" title=\"Copy\">\n      \u003Csvg class=\"w-3.5 h-3.5 copy-icon-svg\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n        \u003Cpath stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Cspan class=\"copy-text\">Copy\u003C\u002Fspan>\n    \u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n  \u003Cdiv class=\"code-block-content p-4 overflow-x-auto text-sm font-mono leading-relaxed bg-[#24292e]\">\n    \u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">\u002F\u002F Grade.java\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">public\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> class\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> Grade\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">    public\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> static\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> void\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> main\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">String\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">[] \u003C\u002Fspan>\u003Cspan style=\"color:#FFAB70\">args\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">        int\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> score \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 78\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        String grade \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> switch\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> (score \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">\u002F\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 10\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">            case\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 10\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\">9\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> ->\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \"A\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">            case\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 8\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\">7\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> ->\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \"B\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">            case\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 6\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> ->\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \"C\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">            default\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> ->\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \"D\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        };\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        System.out.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">println\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"score: \"\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> +\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> score);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        System.out.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">println\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"grade: \"\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> +\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> grade);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\u003Cp>Compile and run it.\u003C\u002Fp>\n\n\u003Cdiv class=\"code-block-wrapper code-output my-6 not-prose rounded-xl border-2 border-black dark:border-gray-600 shadow-neo overflow-hidden text-[#e1e4e8] transition-all\" data-output-block>\n  \u003Cdiv class=\"code-block-header flex items-center justify-between px-4 py-2.5 bg-[#1f2428] border-b-2 border-black dark:border-gray-600 font-mono text-xs font-bold text-gray-300 select-none\">\n    \u003Cdiv class=\"flex items-center gap-2\">\n      \u003Cspan class=\"code-output-mark\" aria-hidden=\"true\">&gt;_\u003C\u002Fspan>\n      \u003Cspan class=\"ml-1 font-mono font-bold text-xs uppercase tracking-wider text-gray-300\">Output\u003C\u002Fspan>\n    \u003C\u002Fdiv>\n    \u003Cbutton type=\"button\" class=\"copy-code-btn flex items-center gap-1.5 px-3 py-1 text-xs font-bold bg-[#2f363d] text-gray-200 border-2 border-black dark:border-gray-500 rounded-lg shadow-neo-sm hover:translate-x-0.5 hover:translate-y-0.5 hover:shadow-none hover:bg-gray-700 transition-all cursor-pointer\" data-code=\"%24%20javac%20Grade.java%20%26%26%20java%20Grade%0Ascore%3A%2078%0Agrade%3A%20B\" title=\"Copy\">\n      \u003Csvg class=\"w-3.5 h-3.5 copy-icon-svg\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n        \u003Cpath stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Cspan class=\"copy-text\">Copy\u003C\u002Fspan>\n    \u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n  \u003Cdiv class=\"code-block-content p-4 overflow-x-auto text-sm font-mono leading-relaxed\">\n    \u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\">\u003Ccode>\u003Cspan class=\"code-output-cmd\">$ javac Grade.java &amp;&amp; java Grade\u003C\u002Fspan>\nscore: 78\ngrade: B\u003C\u002Fcode>\u003C\u002Fpre>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\u003Cp>Then run the same checker against it.\u003C\u002Fp>\n\n\u003Cdiv class=\"code-block-wrapper code-output my-6 not-prose rounded-xl border-2 border-black dark:border-gray-600 shadow-neo overflow-hidden text-[#e1e4e8] transition-all\" data-output-block>\n  \u003Cdiv class=\"code-block-header flex items-center justify-between px-4 py-2.5 bg-[#1f2428] border-b-2 border-black dark:border-gray-600 font-mono text-xs font-bold text-gray-300 select-none\">\n    \u003Cdiv class=\"flex items-center gap-2\">\n      \u003Cspan class=\"code-output-mark\" aria-hidden=\"true\">&gt;_\u003C\u002Fspan>\n      \u003Cspan class=\"ml-1 font-mono font-bold text-xs uppercase tracking-wider text-gray-300\">Output\u003C\u002Fspan>\n    \u003C\u002Fdiv>\n    \u003Cbutton type=\"button\" class=\"copy-code-btn flex items-center gap-1.5 px-3 py-1 text-xs font-bold bg-[#2f363d] text-gray-200 border-2 border-black dark:border-gray-500 rounded-lg shadow-neo-sm hover:translate-x-0.5 hover:translate-y-0.5 hover:shadow-none hover:bg-gray-700 transition-all cursor-pointer\" data-code=\"%24%20java%20Grade%20%7C%20java%20CheckGrade%0APASS%20%20line%201%3A%20score%3A%2078%0APASS%20%20line%202%3A%20grade%3A%20B%0A%0A2%20of%202%20checks%20passed\" title=\"Copy\">\n      \u003Csvg class=\"w-3.5 h-3.5 copy-icon-svg\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n        \u003Cpath stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Cspan class=\"copy-text\">Copy\u003C\u002Fspan>\n    \u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n  \u003Cdiv class=\"code-block-content p-4 overflow-x-auto text-sm font-mono leading-relaxed\">\n    \u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\">\u003Ccode>\u003Cspan class=\"code-output-cmd\">$ java Grade | java CheckGrade\u003C\u002Fspan>\nPASS  line 1: score: 78\nPASS  line 2: grade: B\n\n2 of 2 checks passed\u003C\u002Fcode>\u003C\u002Fpre>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\u003Cp>Three things changed. Each \u003Ccode>-&gt;\u003C\u002Fcode> arm produces one outcome. One arm can carry several labels, as in \u003Ccode>case 10, 9 -&gt; &quot;A&quot;;\u003C\u002Fcode>. And there is no way to fall into the next arm, so the mistake from the first version cannot be written here.\u003C\u002Fp>\n\u003Ch2 id=\"when-the-boundary-is-not-a-multiple-of-ten\">When the boundary is not a multiple of ten\u003C\u002Fh2>\n\u003Cp>The arrow form removes fall-through, but it does not change the arithmetic. \u003Ccode>score \u002F 10\u003C\u002Fcode> puts 89 and 80 in the same bucket, because both divide to \u003Ccode>8\u003C\u002Fcode>. The arrow version prints \u003Ccode>grade: B\u003C\u002Fcode> for a score of 89. A rule that says 85 and up is an A cannot be written as a case on \u003Ccode>score \u002F 10\u003C\u002Fcode>. An \u003Ccode>if\u003C\u002Fcode> chain with \u003Ccode>score &gt;= 85\u003C\u002Fcode> states that rule directly, as the next program does with the score set to 89.\u003C\u002Fp>\n\n\u003Cdiv class=\"code-block-wrapper my-6 not-prose rounded-xl border-2 border-black dark:border-gray-600 shadow-neo overflow-hidden bg-[#24292e] text-[#e1e4e8] transition-all\">\n  \u003Cdiv class=\"code-block-header flex items-center justify-between px-4 py-2.5 bg-[#1f2428] border-b-2 border-black dark:border-gray-600 font-mono text-xs font-bold text-gray-300 select-none\">\n    \u003Cdiv class=\"flex items-center gap-2\">\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#ff5f56] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#ffbd2e] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#27c93f] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"ml-2 font-mono font-bold text-xs uppercase tracking-wider text-gray-300\">JAVA\u003C\u002Fspan>\n    \u003C\u002Fdiv>\n    \u003Cbutton type=\"button\" class=\"copy-code-btn flex items-center gap-1.5 px-3 py-1 text-xs font-bold bg-[#2f363d] text-gray-200 border-2 border-black dark:border-gray-500 rounded-lg shadow-neo-sm hover:translate-x-0.5 hover:translate-y-0.5 hover:shadow-none hover:bg-gray-700 transition-all cursor-pointer\" data-code=\"%2F%2F%20GradeIf.java%0Apublic%20class%20GradeIf%20%7B%0A%20%20%20%20public%20static%20void%20main(String%5B%5D%20args)%20%7B%0A%20%20%20%20%20%20%20%20int%20score%20%3D%2089%3B%0A%20%20%20%20%20%20%20%20String%20grade%3B%0A%20%20%20%20%20%20%20%20if%20(score%20%3E%3D%2085)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20grade%20%3D%20%22A%22%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20(score%20%3E%3D%2070)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20grade%20%3D%20%22B%22%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20(score%20%3E%3D%2060)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20grade%20%3D%20%22C%22%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20grade%20%3D%20%22D%22%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20System.out.println(%22score%3A%20%22%20%2B%20score)%3B%0A%20%20%20%20%20%20%20%20System.out.println(%22grade%3A%20%22%20%2B%20grade)%3B%0A%20%20%20%20%7D%0A%7D\" title=\"Copy\">\n      \u003Csvg class=\"w-3.5 h-3.5 copy-icon-svg\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n        \u003Cpath stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Cspan class=\"copy-text\">Copy\u003C\u002Fspan>\n    \u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n  \u003Cdiv class=\"code-block-content p-4 overflow-x-auto text-sm font-mono leading-relaxed bg-[#24292e]\">\n    \u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">\u002F\u002F GradeIf.java\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">public\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> class\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> GradeIf\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">    public\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> static\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> void\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> main\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">String\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">[] \u003C\u002Fspan>\u003Cspan style=\"color:#FFAB70\">args\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">        int\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> score \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 89\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        String grade;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">        if\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> (score \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">>=\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 85\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">            grade \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \"A\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        } \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">else\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> if\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> (score \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">>=\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 70\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">            grade \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \"B\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        } \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">else\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> if\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> (score \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">>=\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> 60\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">            grade \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \"C\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        } \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">else\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">            grade \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \"D\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        System.out.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">println\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"score: \"\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> +\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> score);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        System.out.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">println\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"grade: \"\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> +\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> grade);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003Cdiv class=\"code-block-wrapper code-output my-6 not-prose rounded-xl border-2 border-black dark:border-gray-600 shadow-neo overflow-hidden text-[#e1e4e8] transition-all\" data-output-block>\n  \u003Cdiv class=\"code-block-header flex items-center justify-between px-4 py-2.5 bg-[#1f2428] border-b-2 border-black dark:border-gray-600 font-mono text-xs font-bold text-gray-300 select-none\">\n    \u003Cdiv class=\"flex items-center gap-2\">\n      \u003Cspan class=\"code-output-mark\" aria-hidden=\"true\">&gt;_\u003C\u002Fspan>\n      \u003Cspan class=\"ml-1 font-mono font-bold text-xs uppercase tracking-wider text-gray-300\">Output\u003C\u002Fspan>\n    \u003C\u002Fdiv>\n    \u003Cbutton type=\"button\" class=\"copy-code-btn flex items-center gap-1.5 px-3 py-1 text-xs font-bold bg-[#2f363d] text-gray-200 border-2 border-black dark:border-gray-500 rounded-lg shadow-neo-sm hover:translate-x-0.5 hover:translate-y-0.5 hover:shadow-none hover:bg-gray-700 transition-all cursor-pointer\" data-code=\"%24%20javac%20GradeIf.java%20%26%26%20java%20GradeIf%0Ascore%3A%2089%0Agrade%3A%20A\" title=\"Copy\">\n      \u003Csvg class=\"w-3.5 h-3.5 copy-icon-svg\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n        \u003Cpath stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Cspan class=\"copy-text\">Copy\u003C\u002Fspan>\n    \u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n  \u003Cdiv class=\"code-block-content p-4 overflow-x-auto text-sm font-mono leading-relaxed\">\n    \u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\">\u003Ccode>\u003Cspan class=\"code-output-cmd\">$ javac GradeIf.java &amp;&amp; java GradeIf\u003C\u002Fspan>\nscore: 89\ngrade: A\u003C\u002Fcode>\u003C\u002Fpre>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\u003Cp>That is an A for the same 89 the arrow switch graded as a B. The two constructs answer different questions when the boundary is not a multiple of ten. Choose \u003Ccode>switch\u003C\u002Fcode> when the values are discrete and few. Choose \u003Ccode>if\u003C\u002Fcode> when the rule is a threshold.\u003C\u002Fp>\n\u003Ch2 id=\"before-the-next-article\">Before the next article\u003C\u002Fh2>\n\u003Cp>Open the fixed file and change \u003Ccode>int score = 78;\u003C\u002Fcode> to \u003Ccode>95\u003C\u002Fcode>. Run it and pipe it into the same checker, unchanged.\u003C\u002Fp>\n\u003Cp>You will see \u003Ccode>score: 95\u003C\u002Fcode> and \u003Ccode>grade: A\u003C\u002Fcode>, which is the right grade for 95. The checker still reports \u003Ccode>0 of 2 checks passed\u003C\u002Fcode>, because it expects \u003Ccode>score: 78\u003C\u002Fcode>. Its input is fixed, so it certifies one input and not the rule.\u003C\u002Fp>\n\u003Cp>If a test only ever feeds one score, which part of the grading rule is still unproven?\u003C\u002Fp>\n","\u003Cul>\n\u003Cli>\u003Ccode>switch\u003C\u002Fcode> leaves a case only when it reaches a \u003Ccode>break\u003C\u002Fcode>, so a missing \u003Ccode>break\u003C\u002Fcode> runs the next case&#39;s statements too.\u003C\u002Fli>\n\u003Cli>In the starter, \u003Ccode>case 7\u003C\u002Fcode> assigns \u003Ccode>B\u003C\u002Fcode> and \u003Ccode>case 6\u003C\u002Fcode> overwrites it with \u003Ccode>C\u003C\u002Fcode>, so a score of 78 prints \u003Ccode>grade: C\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Grouped labels like \u003Ccode>case 10:\u003C\u002Fcode> and \u003Ccode>case 9:\u003C\u002Fcode> fall through on purpose, which is the same mechanism used deliberately.\u003C\u002Fli>\n\u003Cli>The arrow form (\u003Ccode>case 8, 7 -&gt; &quot;B&quot;;\u003C\u002Fcode>) arrived in Java 14 and cannot fall through, because an arm has no statements to fall into.\u003C\u002Fli>\n\u003Cli>\u003Ccode>score \u002F 10\u003C\u002Fcode> puts 89 and 80 in one bucket, so a threshold rule such as 85 and up needs an \u003Ccode>if\u003C\u002Fcode> chain, not a \u003Ccode>switch\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>A checker with a fixed input certifies one score, not the grading rule: feed it 95 and it reports \u003Ccode>0 of 2 checks passed\u003C\u002Fcode>.\u003C\u002Fli>\n\u003C\u002Ful>\n",[148,171,192,197,202,219],{"id":149,"title":150,"title_id":151,"slug":152,"excerpt":153,"excerpt_id":154,"has_translation":12,"published_at":155,"reading_time":156,"hidden_from_listing":15,"tags":157,"thumbnail_image":21,"og_image":162,"series":163,"authors":168},48,"What a Linked List Actually Is","Tentang Struktur Data LinkedList","tentang-struktur-data-linked-list","A linked list is a linear chain of nodes, each holding data and a pointer to the next node. Here is what that chain looks like, what it costs next to an array, and the same minimal implementation in Java, Python, and JavaScript.","Linked list adalah rantai linear berisi node, dan setiap node menyimpan data plus pointer ke node berikutnya. Ini bentuk rantainya, ongkosnya dibanding array, dan implementasi paling sederhana dalam Java, Python, serta JavaScript.","2026-11-21T01:00:00.000Z",4,[158,159,160,161],"struktur-data","linked-list","pointer","konsep","\u002Fog\u002Ftentang-struktur-data-linked-list.png",{"id":164,"title":165,"title_id":166,"slug":167},28,"Linear Data Structures","Struktur Data Linear","asd-struktur-linear",[169],{"authors_id":170},{"id":96,"name":97,"slug":98,"role":99,"profile_picture":21},{"id":172,"title":173,"title_id":174,"slug":175,"excerpt":176,"excerpt_id":177,"has_translation":12,"published_at":178,"reading_time":179,"hidden_from_listing":15,"tags":180,"thumbnail_image":21,"og_image":183,"series":184,"authors":189},47,"Why Understanding Algorithms and Data Structures Actually Matters","Pentingnya Memahami Algoritma dan Struktur Data","pentingnya-memahami-algoritma-dan-struktur-data","An algorithm is an ordered list of steps, and that order decides how expensive a problem is. The examples are on the back of an instant noodle packet, in a factorial, and behind ctrl+z.","Sebagai konsep fundamental, algoritma menentukan seberapa mahal sebuah masalah diselesaikan. Contohnya ada di bungkus mie instan, di bilangan faktorial, dan di tombol undo.","2026-11-19T01:00:00.000Z",7,[181,158,161,182],"algoritma","dasar","\u002Fog\u002Fpentingnya-memahami-algoritma-dan-struktur-data.png",{"id":185,"title":186,"title_id":187,"slug":188},27,"About Algorithms and Data Structures","Tentang Algoritma dan Struktur Data","asd-intro",[190],{"authors_id":191},{"id":96,"name":97,"slug":98,"role":99,"profile_picture":21},{"id":101,"title":102,"title_id":103,"slug":104,"excerpt":105,"excerpt_id":106,"has_translation":12,"published_at":107,"reading_time":81,"hidden_from_listing":15,"tags":108,"thumbnail_image":21,"og_image":110,"series":193,"authors":194},{"id":87,"title":60,"title_id":61,"slug":62},[195],{"authors_id":196},{"id":96,"name":97,"slug":98,"role":99,"profile_picture":21},{"id":74,"title":75,"title_id":76,"slug":77,"excerpt":78,"excerpt_id":79,"has_translation":12,"published_at":80,"reading_time":81,"hidden_from_listing":15,"tags":82,"thumbnail_image":21,"og_image":85,"series":198,"authors":199},{"id":87,"title":60,"title_id":61,"slug":62},[200],{"authors_id":201},{"id":96,"name":97,"slug":98,"role":99,"profile_picture":21},{"id":203,"title":204,"title_id":205,"slug":206,"excerpt":207,"excerpt_id":208,"has_translation":12,"published_at":80,"reading_time":14,"hidden_from_listing":15,"tags":209,"thumbnail_image":21,"og_image":214,"series":215,"authors":216},108,"At 11 a.m. the AI Quota Runs Out, and the Work Stops There","Jam 11 siang kuota AI-nya habis, dan kerjaan berhenti di situ","jam-11-kuota-ai-habis-kerjaan-berhenti","The panel says the usage limit is reached and the work stops, not because it is finished. Three guesses explain it, and all three are wrong: the limit is shaped like a cliff, and the day is built on top of one tool.","Panel di layar bilang batas pemakaian tercapai, dan kerja berhenti di situ. Bukan karena selesai. Ada tiga tebakan kenapa ini terjadi, dan ketiganya salah: batasnya berbentuk tebing, dan harinya dibangun di atas satu alat.",[210,211,212,213],"ai","tooling","rate-limit","produktivitas","\u002Fog\u002Fjam-11-kuota-ai-habis-kerjaan-berhenti.png",{"id":24,"title":25,"title_id":26,"slug":27},[217],{"authors_id":218},{"id":96,"name":97,"slug":98,"role":99,"profile_picture":21},{"id":220,"title":221,"title_id":21,"slug":222,"excerpt":223,"excerpt_id":21,"has_translation":15,"published_at":224,"reading_time":81,"hidden_from_listing":15,"tags":225,"thumbnail_image":21,"og_image":228,"series":229,"authors":230},148,"Go Variables: the Mean That Printed 0.0","go-program-structure-and-variables","Six scores arrive, all six are added up, and Go prints a mean of 0.0. A second `total := 0` inside the `if` block is the whole bug, and the compiler that refuses unused variables has nothing to say about it.","2026-11-11T01:00:00.000Z",[226,182,227],"go","variabel","\u002Fog\u002Fgo-program-structure-and-variables.png",{"id":133,"title":56,"title_id":57,"slug":58},[231],{"authors_id":232},{"id":96,"name":97,"slug":98,"role":99,"profile_picture":21},[234,238,241,244,247,250],{"text":235,"depth":236,"id":237},"The program that prints C",2,"the-program-that-prints-c",{"text":239,"depth":236,"id":240},"What break actually does","what-break-actually-does",{"text":242,"depth":236,"id":243},"A check you can run","a-check-you-can-run",{"text":245,"depth":236,"id":246},"The form that cannot fall through","the-form-that-cannot-fall-through",{"text":248,"depth":236,"id":249},"When the boundary is not a multiple of ten","when-the-boundary-is-not-a-multiple-of-ten",{"text":251,"depth":236,"id":252},"Before the next article","before-the-next-article",1794557078127]