PRO192_-_C1_-_FE_-_SU_2023_391.webp
H

PRO192_-_C1_-_FE_-_SU_2023_391.webp

(Choose 1 answer)
What will happen when you attempt to compile and run the following program:
interface A {
void foo();
void fun();
}
class B implements A {
void foo() {System.out.print("B1");}
void fun() {System.out.print("B2");} 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
Edt 43

Thông tin

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

Image metadata

Filename
PRO192_-_C1_-_FE_-_SU_2023_391.webp
File size
64.7 KB
Dimensions
1713px x 893px

Share this media

Back
Bên trên Bottom