<?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でコードを書いていると、 if (obj instanceof Dog) { ... } のように、型ごとに処理を分ける書き方がありますが、 「少し面倒だな…」と感じたことはないでしょうか？ 実はこの書き方、 もっとシンプルに書くことができます。 それが「ポリモーフィズム」です。 💻 サンプルコード Java Silverの図形の面積を求めるコードだと少しイメージしづらいため、 今回も犬モデルでポリモーフィズムを考えてみます。 abstract class Dog { abstract void action(); } class ShibaDog exten…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.kenichikamoi.com%2Fentry%2F2026%2F03%2F30%2F202309&quot; title=&quot;【Java Silver対策】ポリモーフィズムについて - 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/20260426184417.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2026-03-30 20:23:09</published>
  <title>【Java Silver対策】ポリモーフィズムについて</title>
  <type>rich</type>
  <url>https://blog.kenichikamoi.com/entry/2026/03/30/202309</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
