<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>jwalrus</author_name>
  <author_url>https://blog.hatena.ne.jp/jwalrus/</author_url>
  <blog_title>レッスン with Java言語プログラミングレッスン</blog_title>
  <blog_url>https://jwalrus.hatenadiary.org/</blog_url>
  <categories>
    <anon>第12章</anon>
  </categories>
  <description>「引数の型とクラスの親子関係」で「なぜ引数RectangleのareSameメソッドにNamedRectangleを渡してもエラーにならないのだろう」といぶかってましたが、すぐに説明が出てきました。これがポリモーフィズム（多態性）なのですね。 NamedRectangleのインスタンスを、IS-A関係にあるRectangle型の変数に代入できる。 代入された変数は、Rectangleとして振舞う。 だから、areSameメソッドが受け取った時点で、Rectangleクラスとして振舞うようになっているんですね。ちょっとNamedRectangleなインスタンスをRectangleに代入したときの…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjwalrus.hatenadiary.org%2Fentry%2F20060414%2F1144995885&quot; title=&quot; ポリモーフィズム（多態性）。 - レッスン with Java言語プログラミングレッスン&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2006-04-14 15:24:45</published>
  <title> ポリモーフィズム（多態性）。</title>
  <type>rich</type>
  <url>https://jwalrus.hatenadiary.org/entry/20060414/1144995885</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
