PRO192_-_SU_2024_-_FE_2329.webp
Q

PRO192_-_SU_2024_-_FE_2329.webp

Kizspy | Question: 25 (Choose 1 answer)
What is the output following the code snippet?
public class DemoClass { void add(int x, int y){
System.out.println("1. Addition is: " +(x+y));
} void add(int y, int x){
System.out.println("2. Addition is: " +(x+y));}
public static void main(String[] args){
obj.add(20, 30);
}
DemoClass obj = new DemoClass ();}
A. Compile error
B. 2. Addition of two numbers: 50
C. 1. Addition of two numbers: 50
D. 20, 30

Thông tin

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

Share this media

Back
Bên trên Bottom