è¦ããã«ãJavaã§ä¸è¨ã³ã¼ãmyMethod1ã®å¤æ°iãtwiceã¿ããã«ãã«ã¼ãã®ä¸ã§å¤æ°ã宣è¨ããã¨myMethod2ã®ããã«ã«ã¼ãã®å¤ã§å®£è¨ããããã³ã¹ãããããããããªãããããã¨ããçåã§ãã public void myMethod() { for (int i = 0; i < 10; i++) { int twice; twice = i * 2; System.out.println(twice); } } public void myMethod2() { int i; int twice; for (i = 0; i < 10; i++) { twice = i * 2; System.out.println(twice); } } ç§ã®ã¤ã¡ã¼ã¸ã¯ã (è¨èªã¯éãã¾ãã)ãã¡ãã«æ¸ããã¦ããããã«ãå¤æ°å®£è¨ããã®ã«ä½ããã®å½ä»¤ãçºçããã®ã§ããããã ãã³ã¹ãã¯å¢ãã
{{#tags}}- {{label}}
{{/tags}}