public class TBT { public void method(Object o) { System.out.println(“Object Verion”); } public void method(String s) { System.out.println(“String Version”); } public static void main(String args[]) { TBT question = new TBT(); question.method(null); } } Cho chương trình sau.Cho biết kết quả sau khi thực thi chương trình trên?

public class TBT {

public void method(Object o) {

System.out.println(“Object Verion”);

}

public void method(String s) {

System.out.println(“String Version”);

}

public static void main(String args[]) {

TBT question = new TBT();

question.method(null);

}

}

Cho chương trình sau.Cho biết kết quả sau khi thực thi chương trình trên?

A. Đoạn mã không biên dịch

B. Biên dịch thành công và hiển thị kết quả “String Version”

C. Biên dịch thành công và hiển thị kết quả “Object Verion”

D. Đoạn mã xảy ra ngoại lệ Exception khi thực hiện

Hướng dẫn

Chọn B là đáp án đúng

 

Thư viện tài liệu12 Tháng bảy, 2023 @ 2:38 chiều

Đánh giá chủ đề này
How to whitelist website on AdBlocker?

How to whitelist website on AdBlocker?

  1. 1 Click on the AdBlock Plus icon on the top right corner of your browser
  2. 2 Click on "Enabled on this site" from the AdBlock Plus option
  3. 3 Refresh the page and start browsing the site