PRO192_-_SP_2024_-_RE_1741.webp
Izumi991

PRO192_-_SP_2024_-_RE_1741.webp

  • Media owner Izumi991
  • Ngày thêm
(Choose 1 answer)
class does not have the foo() method):
What will happen when you attempt to compile and run the following program (please note that the Object
class A {
void foo() {System.out.print("A");}}
class B {
void foo() {System.out.print("B");}
} class C extends A {
void foo() {System.out.print("C");}}
class Main {
public static void main(String[] args) {
Object t = new A();
t.foo();
t = new B();
t.foo();t = new C();
t.foo();
}
}
A. Compile-time error
B. ABC
C. ACB
D BCA


Q: 12

Thông tin

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

Image metadata

Filename
PRO192_-_SP_2024_-_RE_1741.webp
File size
213.8 KB
Dimensions
1920px x 892px

Share this media

Back
Bên trên Bottom