class Q7 { public static void main(String[] args) { double d = 12.3; Decrement dec = new Decrement(); dec.decrement(d); System.out.println(d); } }; class Decrement { public void decrement(double decMe) { decMe = decMe – 1.0; } } Cho đoạn mã sau. Giá trị in ra của câu lệnh dòng thứ 6 là:

class Q7 {

public static void main(String[] args) {

double d = 12.3;

Decrement dec = new Decrement();

dec.decrement(d);

System.out.println(d);

}

};

class Decrement {

public void decrement(double decMe) {

decMe = decMe – 1.0;

}

}

Cho đoạn mã sau. Giá trị in ra của câu lệnh dòng thứ 6 là:

A. 0.0

B. -1.0

C. 12.3

D.  11.3

Hướng dẫn

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

 

Thư viện tài liệu12 Tháng bảy, 2023 @ 2:30 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