MCQ
In Java, if we want to allow data directly accessed by methods of other class, then which method is used ?
  • Getter
  • B
    Setter
  • C
    Both A & B
  • D
    Package

Answer

Correct option: A.
Getter
A

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free