Q. In Java, can a constructor have a return type?

  • (A) No, constructors do not have a return type
  • (B) Yes, it must have the same return type as the class
  • (C) Yes, it can have any return type
  • (D) Yes, but it must be "void"
πŸ’¬ Discuss
βœ… Correct Answer: (A) No, constructors do not have a return type

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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