A

Admin • 831K Points
Coach

Q. What is the prototype of the default constructor?
public class Test { }

  • (A) public Test(void)
  • (B) Test( )
  • (C) Test(void)
  • (D) Test(void) D. public Test( )
  • Correct Answer - Option(D)
  • Views: 16
  • Filed under category Java
  • Hashtags:

Explanation by: Admin
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).

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.