Encapsulation & Scope — Chapter Test

Answer all 5 questions, then submit. You need 60% to pass. Log in to save progress.

Question 1
Which access specifier makes a member visible ONLY inside its own class?
Apublic
Bprotected
Cprivate
Dstatic
Question 2
Which specifier makes a member visible everywhere?
Aprivate
Bprotected
Cpublic
Dlocal
Question 3
A variable with one shared copy for the whole class is a…
Alocal variable
Binstance variable
Cclass (static) variable
Dargument variable
Question 4
A variable declared inside a method, used only there, is a…
Aclass variable
Binstance variable
Clocal variable
Dpublic variable
Question 5
Good encapsulation usually means making data ___ and methods ___.
Apublic, private
Bprivate, public
Cstatic, local
Dprotected, protected