MCQ
Which of the following methods and variables are directly accessible only by the method defined within a class?
  • private
  • B
    public
  • C
    protected
  • D
    package

Answer

Correct option: A.
private
private

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