Home / Questions / Give a difference between a constructor and a method.
Explanatory Question

Give a difference between a constructor and a method.

👁 76 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

Constructor has the same name as class name whereas function should have a different name than class name.