PRO192_-_SU_2023_-_Block_5_-_FE_735.webp
successful_man

PRO192_-_SU_2023_-_Block_5_-_FE_735.webp

38
Answer (Choose 1 answer)
A. compilation error
B. compiles fine but print nothing
C. will print Class One method
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
successful_man
Ngày thêm
Lượt xem
2,067
Lượt bình luận
12
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRO192_-_SU_2023_-_Block_5_-_FE_735.webp
File size
54 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom