PRO192_-_SP_2024_-_RE_1741.webp
Izumi991

PRO192_-_SP_2024_-_RE_1741.webp

  • Media owner Izumi991
  • Ngày thêm
(Choose 1 answer)
class Output {
What will be the output of the following Java program?
public static int sum(int... nums) {
int sum = 0;
for (int x: nums) {
sum += x;
} return sum;
}
public static void main(String args[]) {
sum(10);
sum(10, 20);
System.out.println(sum (10, 20));
}
}
A. 10
B. 10, 10, 20
C. 30
D. Compiler error
Osh

Thông tin

Category
PRO192
Thêm bởi
Izumi991
Ngày thêm
Lượt xem
4,426
Lượt bình luận
18
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRO192_-_SP_2024_-_RE_1741.webp
File size
171.5 KB
Dimensions
1920px x 892px

Share this media

Back
Bên trên Bottom