<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shigemk2</author_name>
  <author_url>https://blog.hatena.ne.jp/shigemk2/</author_url>
  <blog_title>by shigemk2</blog_title>
  <blog_url>https://www.shigemk2.com/</blog_url>
  <categories>
    <anon>Scala</anon>
  </categories>
  <description>要点 if-elseの書き方は他のプログラミング言語とあまり変わらない 条件式の結果がtrueかどうかにもとづき処理を分岐させる Javaと違いScalaのifは最後に評価された値を返す 条件式がfalseでelseがなかったときに返される値は()となる コード cala&gt; val x = 0 x: Int = 0 scala&gt; if(x == 0) println(&quot;x = 0&quot;) x = 0 scala&gt; if(x == 1) println(&quot;x = 1&quot;) scala&gt; val result = if(x == 0) &quot;x is zero&quot; else &quot;x is one&quot; result…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.shigemk2.com%2Fentry%2F2014%2F01%2F29%2FScala%25E3%2581%25AEif&quot; title=&quot;Scalaのif - by shigemk2&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>http://ecx.images-amazon.com/images/I/315Gw-Mz1PL._AA180_.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-01-29 20:28:43</published>
  <title>Scalaのif</title>
  <type>rich</type>
  <url>https://www.shigemk2.com/entry/2014/01/29/Scala%E3%81%AEif</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
