Question

In object-oriented programming, what is the scope of an instance variable?

A It can be accessed from any method within the same class.
B It can be accessed from any instance of the same class.
C It can only be accessed from within the constructor of the class.
D It can only be accessed from static methods of the class.
Practice Next

Relevant for Exams:

Hey! Ask a query