PRO192_-_SP_2024_-_RE_1741.webp
Izumi991

PRO192_-_SP_2024_-_RE_1741.webp

  • Media owner Izumi991
  • Ngày thêm
(Choose 1 answer)
What happens if the following code compile and run?
abstract class A {
void fun() {}
final void foo() {System.out.println("foo");}}
class B extends A {
void fun() {System.out.println("B");}final void foo() {System.out.println("BB");}}
class Main {
public static void main(String args[]){A t = new B(); t.fun(); t.foo();System.out.println();}
A. An error is thrown when the program is compiled.
B. The output is BBB
C. The output is fooBB
D. The program executes with no output.


Q: 10

Thông tin

Category
PRO192
Thêm bởi
Izumi991
Ngày thêm
Lượt xem
4,541
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
212 KB
Dimensions
1920px x 892px

Share this media

Back
Bên trên Bottom