<?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>水晶を管理しているギルドマスター（Adobe Fireflyで作成） 🟢 はじめに Javaを学んでいると、 「一見正しく動きそうなのに、なぜかコンパイルエラーになる…」 という場面に出くわすことがあると思います。 今回は、Java Silver特有の「ひっかけ問題」について解説してみたいと思います。 テーマは、 「文字の切り出し（substring）」 と 「結果を変数に入れる（switch式）」 です。 💻 問題（ソースコード） まずは、以下のコードを見てみましょう。 ダンジョンで見つけた「古文書の暗号」を解読し、それに応じた「魔石」を手に入れるプログラムです。 public class …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.kenichikamoi.com%2Fentry%2F2026%2F05%2F19%2F173221&quot; title=&quot;【Java Silver対策】「substring」と「switch式」について - 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/20260519/20260519144838.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2026-05-19 17:32:21</published>
  <title>【Java Silver対策】「substring」と「switch式」について</title>
  <type>rich</type>
  <url>https://blog.kenichikamoi.com/entry/2026/05/19/173221</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
