多做题,通过考试没问题!

Java认证考试

睦霖题库>其他计算机考试>Java认证考试

class TestApp{   public static void main(String[] args){   System.out.println(multiply(2,3,4,5));  }   public int multiply(int… nums){   int result = 1;   for(int x :nums)   result *= x;  //result =result*x;   return result;  }  }   2、6、24、120   程序运行后的输出是哪项?()  

  • A、 14
  • B、 编译错误
  • C、 120
  • D、 24
正确答案:C
答案解析:
进入题库查看解析

微信扫一扫手机做题