Question
48. Which of the following statements are true? a. Information hiding is achieved by restricting access to class members via keyword public. b. The private
48. Which of the following statements are true?
a. Information hiding is achieved by restricting access to class members via keyword public.
b. The private members of a class are directly accessible to the clients of a class.
c. None of the above are true.
d. Methods and instance variables can both be either public or private.
49. When must a program explicitly use this reference?
a. Accessing a private variable.
b. Accessing a public variable.
c. Accessing a local variable.
d. Accessing an instance variable that is shadowed by a local variable.
50. Constructors: (Select all that apply)
a. When overloaded, can have identical argument lists.
b. When overloaded, are selected by number, types and order of types of parameters.
c. Initialize instance variables.
51. Set methods are also commonly called ________ methods and get methods are also commonly called ________ methods.
a. query, mutator
b. accessor, mutator
c. mutator, accessor
d. query, accessor
52. Composition is sometimes referred to as a(n) ___________.
a. many-to-one relationship
b. one-to-many relationship
c. has-a relationship
d. is-a relationship
53. Instance variables declared final do not or cannot:
a. be modified after they are initialized.
b. cause syntax errors if used as a left-hand value.
c. be initialized.
d. None of the above.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started