実行結果はOK
だと思っていたのですが実際にはOKOK
でした。1つ目のOK
のあと再度OK
が表示されたのはなぜでしょうか?アドバイスよろしくお願いいたします。
java
1public class Test { 2 public static int a = Test.make(); 3 4 public static int make() { 5 System.out.println("OK"); 6 return 100; 7 } 8}
java
1public class Main { 2 public static void main(String[] args) { 3 Test.make(); 4 } 5}
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2018/01/21 09:06
2018/01/21 09:19
退会済みユーザー
2018/01/21 11:17