String s1[] = new String[5]; String str = s1[0].toUpperCase(); System.out.println(str); Cho đoạn mã sau đây. Hãy cho biết kết quả khi thực thi đoạn lệnh trên ?

String s1[] = new String[5];

String str = s1[0].toUpperCase();

System.out.println(str);

Cho đoạn mã sau đây. Hãy cho biết kết quả khi thực thi đoạn lệnh trên ?

A. Đưa ra ngoại lệ NullPointException

B. Sẽ in ra giá trị null

C. Sẽ không thực thi được chương trình

D. Sẽ in ra giá trị NULL

Hướng dẫn

Chọn A 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