B

Bhagwan Das • 4.44K Points
Extraordinary

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: 42
  • Filed under category JAVA

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics