Java OCA OCP Practice Question 61

Question

Structuring a Java class such that only methods within the class can access its instance variables is referred to as ____.

  • A. platform independence
  • B. object orientation
  • C. inheritance
  • D. encapsulation


D.

Note

Encapsulation is the technique of removing access to a class's instance variables from processes outside the class, making Option D the correct answer.




PreviousNext

Related