ã¡ãã£ã¨åã«ãé
åä¸ã®ãã¹ã¦ã®è¦ç´ ãæ¡ä»¶ãæºãããã©ããå¤å¥ããé¢æ°ã§ã空ã®é
åã¯Trueãè¿ãã¹ããFalseãè¿ãã¹ãããã®ãããªè©±ã話é¡ã«ãªã£ã¦ã¾ããã ã¾ãããã¯ãTrueãè¿ãããçããªããã§ãããã§ã¯ãé
åä¸ã®æ大å¤ãè¿ãé¢æ°ã§ç©ºã®é
åã®å ´åã¯ä½ãè¿ããããæ°ã«ãªãã¾ããã ãé
åä¸ã®ãã¹ã¦ã®è¦ç´ ãæ¡ä»¶ãæºãããã©ããå¤å¥ããé¢æ°ãã«ã¤ãã¦è¨ãã°ãç°¡åã«è¨ãã°ãããªæãã ã¾ããé
åã®ãã¹ã¦ã®è¦ç´ ãå¶æ°ã§ãããã©ããå¤å¥ããé¢æ°ãèãã¾ãã void main() { int[] data = { 23, 44, 12, 98, 5 }; System.out.println(allEven(data)); } boolean allEven(int[] data) { for (int n : data) { if (n % 2 != 0) return false; } r
{{#tags}}- {{label}}
{{/tags}}