Option A and B are wrong because they use the default access modifier and the access modifier for the class is public (remember, the default constructor has the same access modifier as the class).
Option D is wrong. The void makes the compiler think that this is a method specification - in fact if it were a method specification the compiler would spit it out.
Why the option A is wrong ?
The compiler will implicitly put "public" in front of Test(). Then why this option is wrong.
And wht do you mean by prototype ?
Mahesh said:
(Mon, Jan 2, 2012 12:13:26 PM)
Option A is wrong. The default constructor has the same access modifier as the class. Here the is defined public so default constructor must be public. And Test() is in default access level.
The compiler will not implicitly put "public" in front of Test().
Saritha said:
(Tue, Jan 31, 2012 05:53:15 PM)
If the class having the access modifier as private. Then is it the default constructor of class is private?