A

Admin • 825.56K Points
Coach

Q. public class MyClass{ }

For the above class(MyClass) what is the correct way of declaring constructor?

  • (A) MyClass(){}
  • (B) MyClass(void) {}
  • (C) public MyClass(){}
  • (D) 1 and 3
  • Correct Answer - Option(D)
  • Views: 10
  • Filed under category Java
  • Hashtags:

Explanation by: Admin
Choice A,C are the correct answers.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.