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
πŸ’¬ Discuss
βœ… Correct Answer: (D) 1 and 3
Explanation: Choice A,C are the correct answers.
Explanation by: Bhagwan Das
Choice A,C are the correct answers.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
100
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Bhagwan Das
Publisher
πŸ“ˆ
87%
Success Rate