{"url":"https://yoshikit1996.hatenablog.com/entry/2019/01/27/192746","provider_url":"https://hatena.blog","version":"1.0","author_name":"yoshikit1996","blog_title":"yoshikit1996\u2019s diary","published":"2019-01-27 19:27:46","description":"\u30af\u30e9\u30b9\u30d1\u30e9\u30e1\u30fc\u30bf \u30af\u30e9\u30b9\u540d\u306e\u76f4\u5f8c\u306b\u66f8\u304f\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3092\u57fa\u672c\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3068\u547c\u3073\uff0c\u57fa\u672c\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306e\u5f15\u6570\u3092\u30af\u30e9\u30b9\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u3044\u3046\uff0e class Rational(n: Int, d: Int) \u4e8b\u524d\u6761\u4ef6\u30c1\u30a7\u30c3\u30af require\u3092\u4f7f\u3046\u3068\uff0c\u5f15\u6570\u306b\u6e21\u3055\u308c\u308b\u5024\u306b\u5236\u9650\u3092\u8a2d\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u308b\uff0e class Rational(n: Int, d: Int){ require(d != 0) override def toString = n + \"/\" + d } \u30af\u30e9\u30b9\u306b\u304a\u3051\u308bvar, val\u306e\u53ef\u8996\u6027 class Num(n: Int) // private class Num(val n: Int) //\u2026","height":"190","categories":[],"title":"Scala\u30b9\u30b1\u30fc\u30e9\u30d6\u30eb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8aad\u66f8\u30e1\u30e2\uff12","image_url":null,"blog_url":"https://yoshikit1996.hatenablog.com/","provider_name":"Hatena Blog","width":"100%","author_url":"https://blog.hatena.ne.jp/yoshikit1996/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyoshikit1996.hatenablog.com%2Fentry%2F2019%2F01%2F27%2F192746\" title=\"Scala\u30b9\u30b1\u30fc\u30e9\u30d6\u30eb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8aad\u66f8\u30e1\u30e2\uff12 - yoshikit1996\u2019s diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich"}