PRO192_-_QUIZ2_-_SL4_3930.webp
Hữu Vinh

PRO192_-_QUIZ2_-_SL4_3930.webp

Question 8
Not yet
answered
Flag question
What will be the output of the following code snippet?
public class Main {
public static void main(String[] args) {
System.out.println(foo(5));
}
}
}
public static int foo(int n) {
if (n <= 1) {
return 1;
}
return n * foo(n - 1);
○ A. 6
B. 5
C. 120
O D. 24

Thông tin

Category
PRO192
Thêm bởi
Hữu Vinh
Ngày thêm
Lượt xem
424
Lượt bình luận
4
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom