ä»äºæãJavaã®enumã使ããã¨ãå¤ãã®ã§ããããã¾ãä¸ã®ä¸ã®ããã°ã©ã ã§enumãå
¨åã§ä½¿ã£ã¦ãã¨ããããã¾ãè¦ããã¾ããã ã¨ãããã¨ã§ãèªåã§ãã©ããªã®ã¨æãã¨ããã¡ãã»ãããenumã®ä½¿ãæ¹ãã¾ã¨ãã¦ã¿ããã¨æãã¾ãããã¨ããããä»åã¯æ®éã®å¾©ç¿ç¨ã«åºæ¬çãªæ©è½ãã åä»ã®å®æ°ã宣è¨ã§ãã enumã¯ãã¨ãã¨Cã®intå½¢ã®å¤ã«ååãã¤ããã ããããªãã¦ãåå®å
¨ãªåæå®æ°ãä½ããã£ã¦ãã¨ã§Java5ããå°å
¥ããã¾ããã ãããªæãã public enum Sample { HOGE, FOO, BAR, } ã§ãä¸ã®ä¸ã§è¦ãããenumã¯ä¸è¨ãããã®ã·ã³ãã«ãªã®ãå¤ãã¿ããã§ãã ã¯ã©ã¹æ¬ä½ã宣è¨ã§ãã å®æ°å®ç¾©ã®ãã¨ã« ";" ã§åºåãã¨ã以éãã¯ã©ã¹ã®æ¬ä½ã¨ãã¦ã¡ã½ããã¨ãå®ç¾©ã§ãã¾ãã public enum Sample { HOGE, FOO, BAR, ; // ã»
{{#tags}}- {{label}}
{{/tags}}