PRO192_-_SU_2025_-_QUIZ2_3925.webp
Hữu Vinh

PRO192_-_SU_2025_-_QUIZ2_3925.webp

Question 19
Answer saved
Flag
question
class A {
void sum(int x, int y){
}
"
System.out.println("Sum of two numbers: +(x+y));
void sum(int y, int x) {
}
System.out.println("Sum of three numbers: " +(x+y));
public static void main(String[] args) {
}
A a = new A();
}
a.sum (20, 30);
OA. The code has a compilation error due to an undeclared class.
B. The code has a syntax error due to incorrect method calls.
OC. The code has a duplicate method error.
D. The code has a runtime error in the main method.
Clear my choice
Chưa có bình luận nào.

Thông tin

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

Share this media

Back
Bên trên Bottom