MKT101_-_SP_2023_-_FE_77.webp
Đ

MKT101_-_SP_2023_-_FE_77.webp

(Choose 1 answer)
A. 30
B. Compiler error
C. 10
D. 10, 10, 20
class Output {
What will be the output of the following Java program?
public static int sum(int... x) { int sum = 0;
for (int xx: x) {
sum += xx
}
return sum;
}
public static void main(String args[]) {
sum(10);
sum(10, 20);
System.out.println(sum (10, 20));
an tot ni
  • Like
Reactions: ha hong nhu y

Thông tin

Category
MKT101
Thêm bởi
Đức Long
Ngày thêm
Lượt xem
1,589
Lượt bình luận
6
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom