---
title: "What is the difference between a constructor and a method?"  
description: "What is the difference between a constructor and a method?"  
author: "Chris Anderson"  
published: 2012-06-13  
updated: 2020-09-15  
canonical: https://www.mindstick.com/interview/1478/what-is-the-difference-between-a-constructor-and-a-method  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# What is the difference between a constructor and a method?

A constructor is a member function of a class that is used to create objects of that class. It has the same name as the class itself, has no return type, and is invoked using the new operator.\
A method is an ordinary member function of a class. It has its own name, a return type (which may be void), and is invoked using the dot operator.

## Answers

### Answer by Chris Anderson

A constructor is a member function of a class that is used to create objects of that class. It has the same name as the class itself, has no return type, and is invoked using the new operator.\
A method is an ordinary member function of a class. It has its own name, a return type (which may be void), and is invoked using the dot operator.


---

Original Source: https://www.mindstick.com/interview/1478/what-is-the-difference-between-a-constructor-and-a-method

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
