PRO192_FE_SP23_311.webp
Soram

PRO192_FE_SP23_311.webp

  • Media owner Soram
  • Ngày thêm
Bài viết gốc: Chủ đề 'PRO192 FE SP23'
(Choose 1 answer)
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();
}
}
A. will print Class One method
B. will print Class Two method
C. compiles fine but print nothing
ID compilation error

Thông tin

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

Share this media

Back
Bên trên Bottom