Java Tutorial Part32 | Constructors|Types of Constructor|Default and Parameterized

Опубликовано: 22 Май 2026
на канале: ARIVU INFO
14
0

Java Tutorial Part32 | Constructors|Types of Constructor|Default and Parameterized|Initialization through Constructors

Rules for creating Java constructor
Constructor name must be the same as its class name
A Constructor must have no explicit return type

Types of Java constructors
Default constructor (no-arg constructor)
Parameterized constructor

A constructor is called "Default Constructor" when it doesn't have any parameter.
If there is no constructor in a class, compiler automatically creates a default constructor.

What is the purpose of a default constructor?
The default constructor is used to provide the default values to the object like 0, null, etc., depending on the type.

A constructor which has a specific number of parameters is called a parameterized constructor.

Why use the parameterized constructor?
The parameterized constructor is used to provide different values to distinct objects.

If this video is useful to you, please like and share If you didn't subscribe kindly subscribe. So that you will get a notification about my new videos

Python Course full playlist:    • Python Tutorial in Tamil  
C Language Course full playlist:    • C Language Full Course  
Python Course English full playlist:    • Python Tutorial in English  
Java Course English full playlist:    • Java Tutorial in English  
Subscribe to our channel by clicking here 👉👉🏾    / @arivuinfo_6666  
#ARIVU_INFO