PHP5.4ã«ã¯ãã¬ã¤ãã¨ããææ³ãå°å
¥ããã¦ãå¤éç¶æ¿ã®ä¾¿å©ãã享åã§ããããã«ãªãããã§ãã ãããã試ãã¦ã¿ããã¨ã«ãã¾ããã ãã¬ã¤ãã¨ããã°ä»£è¡¨é¸æã¯Scalaã§ãããScalaã§ãããã¬ã¤ãã¯ãã¤ã³ã¿ã¼ãã§ã¼ã¹ã®å®ç¾©ã¨ã¡ã½ããã®å®è£
ãåæã«ãã£ã¦ããã便å©ãªæ¦å¿µã§ãããåä¸ç¶æ¿ã®OOPè¨èªã§ã¯ããã¯ãã®ä¸ç¨®ãã¨ããå¶ç´ãå¼·ããã¦ãããã³ã®ã³ã¯é³¥ã®é£è¡ã¡ã½ããã«ãã£ã¦é£è¡ã§ãã¦ãã¾ããã¨ããåé¡ãããã¾ããã§ãã¡ããã¨ããã³ã®ã³ã¯é£ã¹ãªããæ³³ããé³¥ãã綺éºã«è§£æ±ºããå¿
è¦ã¯ãã£ã¦ããã®è§£çã¨ãã¦ããã¬ã¤ãã®ããScalaã§ã¯ãããªè§£ãå°ãã¾ãã abstract class Animal abstract class Bird extends Animal { def hasBeak = true // é³¥ã«ã¯ããªããã¯ããã·ããã def hasWings = true // 翼
{{#tags}}- {{label}}
{{/tags}}