<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kamoi-kenichi</author_name>
  <author_url>https://blog.hatena.ne.jp/kamoi-kenichi/</author_url>
  <blog_title>System.out.println(&quot;Java学習中&quot;);</blog_title>
  <blog_url>https://blog.kenichikamoi.com/</blog_url>
  <categories>
    <anon>【Java Silver対策】</anon>
  </categories>
  <description>🟢 はじめに Javaの学習をしていると、文法的には間違っていないのに「思っていた動きと違う！」というバグに遭遇することがあります。 今回は、Java Silverの試験によく出ると言われている「波括弧 { } を省略した if 文の罠」について、RPGの勇者の冒険に例えながら解説します！ 💻 サンプルコード 勇者の現在の「HP（体力）」をチェックして、メッセージを表示するプログラムを書いてみました。 以下のコードを実行すると、コンソールには何が表示されるでしょうか？ public class RpgTrap { public static void main(String[] args) {…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.kenichikamoi.com%2Fentry%2F2026%2F04%2F16%2F075338&quot; title=&quot;【Java Silver対策】波括弧 { } のない if 文の引っかけ問題 - System.out.println(&amp;quot;Java学習中&amp;quot;);&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/k/kamoi-kenichi/20260426/20260426130446.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2026-04-16 07:53:38</published>
  <title>【Java Silver対策】波括弧 { } のない if 文の引っかけ問題</title>
  <type>rich</type>
  <url>https://blog.kenichikamoi.com/entry/2026/04/16/075338</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
