Vidyalelo
Java Programming · Q69

Miscellaneous Java

Programming · Java Programming · question 69

Q69

What happens if constructor of class A is made private?

A.
Any class can instantiate objects of class A
B.
Objects of class A can be instantiated only within the class where it is declared
Answer
C.
Inherited class can instantiate objects of class A
D.
classes within the same package as class A can instantiate objects of class A

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board