PRO192_-_SP_2024_-_FE_1629.webp
N

PRO192_-_SP_2024_-_FE_1629.webp

What will happen when you attempt to compile and run the following program:
Answer (Choose 1 answer)
interface A { void foo();
void fun();
}
class B implements A {
void foo() {System.out.print("B1");}
void fun() {System.out.print("B2");}
}
class Main {
public static void main(String[] args) {
A t = new B();
t.foo();t.fun();
}
A. The program causes errors when it is compiled.
B. The output is B1B2
C. The program executes with no output.
D. The output is B2B1

Iv

Exit 39

Thông tin

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

Image metadata

Filename
PRO192_-_SP_2024_-_FE_1629.webp
File size
69.2 KB
Dimensions
1926px x 906px

Share this media

Back
Bên trên Bottom