PRO192_-_C1_-_FE_-_SU_2023_391.webp
H

PRO192_-_C1_-_FE_-_SU_2023_391.webp

(Choose 1 answer)
What will be the output of following code?
abstract class A{
public A() {System.out.println("Father");}
abstract public void out();
}
class B extends A{
public B() {System.out.println("Son");}
@Overridepublic void out() { } System.out.println("Father loves son!");
} public class Main1 {
public static void main(String[] args) { A b=new B();b.out();}
}
A. Son
Father loves son!
B. Father
Father loves son!
C. Father
Son
Father loves son!
D. Run time error
Edt (28

Thông tin

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

Image metadata

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

Share this media

Back
Bên trên Bottom