# Constructor

say it: **“kun-STRUK-ter”** **/kənˈstrʌktər/**

Special class code that initializes a new object.

## What is **Constructor** in Java?

**Constructor** — Special class code that initializes a new object.

```java
class Book {
    String title;

    Book(String title) {
        this.title = title;
    }
}
```

Level: Journeyman · [More Java terms at this level](https://www.ask-codey.com/glossary?category=java&level=3)

Updated: November 17, 2026

## In other subjects

- [Constructor in C#](https://www.ask-codey.com/glossary/constructor-c-sharp)
- [Constructor in JavaScript](https://www.ask-codey.com/glossary/constructor-javascript)
- [Constructor in OOP](https://www.ask-codey.com/glossary/constructor-oop)

Source: https://www.ask-codey.com/glossary/constructor
