Câu hỏi:

28/07/2025 97 Lưu

A variable that is declared protected:

A. Is visible only in the subclasses (and not in the class it is declared in)

B. Is visible only in the class it is declared in

C. Is visible to all classes, but modifiable only in the class where it is declared

D. Is visible in the class it is declared in, and all of its sub-classes

Quảng cáo

Trả lời:

verified Giải bởi Vietjack

Chọn đáp án D

CÂU HỎI HOT CÙNG CHỦ ĐỀ

Lời giải

Chọn đáp án B

Lời giải

Bạn cần đăng ký gói VIP ( giá chỉ từ 250K ) để làm bài, xem đáp án và lời giải chi tiết không giới hạn.

Nâng cấp VIP

Câu 5

A. Have wine and cheese with that other friend

B. Allow that class to declare an instance of it in its list of private variables

C. Allow the other class (the one declared as friend) to access to the declaring class’s private variables

D. Allow the class declaring the other as a friend to access the declared class’s private variables

Lời giải

Bạn cần đăng ký gói VIP ( giá chỉ từ 250K ) để làm bài, xem đáp án và lời giải chi tiết không giới hạn.

Nâng cấp VIP

Lời giải

Bạn cần đăng ký gói VIP ( giá chỉ từ 250K ) để làm bài, xem đáp án và lời giải chi tiết không giới hạn.

Nâng cấp VIP

Lời giải

Bạn cần đăng ký gói VIP ( giá chỉ từ 250K ) để làm bài, xem đáp án và lời giải chi tiết không giới hạn.

Nâng cấp VIP