次のコードを実行したときの画面出力は?
class Wallet
{
  private int money;
  public Wallet(){
    money=1000;
  }
  public Wallet(int m){
    this();
    money = m;
  }
  public int get(){
    return money;
  }
}

class Test
{
  public static void main(String[] args){
    Wallet mine=new Wallet(2000);
    System.out.print(mine.get());
  }
}
□選択肢
(1) 1000
(2) 2000
(3) 3000
答えは  (2)  です
※答えはタッチで!!

0
0