PRO192_-_FA_2023_-_FE_1027.webp
Erza_girl

PRO192_-_FA_2023_-_FE_1027.webp

(11
Answer (Choose 1 answer)
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
interface A {
void foo();
What will happen when you attempt to compile and run the following program:
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();


Thông tin

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

Image metadata

Filename
PRO192_-_FA_2023_-_FE_1027.webp
File size
52.7 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom