Tech Mahindra Interview Question

What is constructor and how is different from method