PRO192_-_FA_2023_-_FE_1027.webp
Erza_girl

PRO192_-_FA_2023_-_FE_1027.webp

42
Answer (Choose 1 answer)
A. compilation error
B. will print Class One method
C. compiles fine but print nothing
D. will print Class Two method


What will be the output?
interface A{
public void method();}
class One{
public void method(){System.out.println("Class One method");}
}
class Two extends One implements A{public void method(){System.out.println("Class Two method");}
}
public class Main extends Two{
public static void main(String[] args) { A a = new Two();a.method();}
}

Thông tin

Category
PRO192
Thêm bởi
Erza_girl
Ngày thêm
Lượt xem
3,309
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
55.4 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom