Hi Sarim,
i changed the code a little bit...
a. the code will fail to compile
b. the constructor in A that takes an int as an argument will never be called as a result of constructing an object of class B or C
c. Class C has three constructors
d.objects of class B cannot be constructed
e.at most one of the constructors of each class is called as a result of constructing an object of class C Here are my suggestions
a) FALSE. Compiles without problems
b) TRUE. If you create an Object C with the Constructor in line 11,
super() will be implicitly called, BUT this is default constructor of Class B, this one will call default Constructor of Class A. So A(int) will never be called.
NOTE: line 6 is NOT a constructor, it's a method, so the default constructor will be created from the compiler c) TRUE. line 9, 10, 11 are constructor, so we have three constructors
d) FALSE. You can construct objects of Class B. Default constructor will be created from the compiler
e) FALSE. If you create an object C with C(String msg), the private constructor of C will be called. In this case, two constructors of C were used, so the answer has to be FALSE (Perhaps my english is not so good and i didn't get the meaning of the last answer, but that's my understanding)
Hope that helps,
as always, correct me if i'm wrong
cheers
Oliver
[This message has been edited by Oliver
Grass (edited November 10, 2000).]