int anar[] = new int[5]; System.out.println(anar[0]); Cho đoạn mã sau. Sau khi thực hiện đoan lệnh trên, có kết quả ra sao?

int anar[] = new int[5];

System.out.println(anar[0]);

Cho đoạn mã sau. Sau khi thực hiện đoan lệnh trên, có kết quả ra sao?

A. 0

B. 5

C. null

D. Lỗi : mảng anar được tham chiếu đến trước khi khởi tạo

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