Learn Pain Less

HomeOur TeamContact
Java
What is Constructor in JAVA
Pawneshwer Gupta
Pawneshwer Gupta
March 23, 2015
1 min

Table Of Contents

01
Constructor in java
02
Key features of constructor:
What is Constructor in JAVA

Constructor in java

Constructor is initializer block in class. This block call when class initialized. Constructor block called when instance of class is created. Without constructor we can’t create instance of that class. If we doesn’t create any constructor in a class then that class have a default constructor.

Key features of constructor:

  1. Constructor doesn’t have any return type.
  2. Constructor by default return instance of that class.
  3. Constructor called when instance of clasd is created. Constructor called before other methods.
  4. Constructor have same name as the class name.
  5. Constructor will look like method without return type.

Subscribe to our newsletter!

We'll send you the best of our blog just once a month. We promise.

Tags

startconstructorjava tutorial

Share


Pawneshwer Gupta

Pawneshwer Gupta

Software Developer

Pawneshwer Gupta works as a software engineer who is enthusiastic in creating efficient and innovative software solutions.

Expertise

Python
Flutter
Laravel
NodeJS

Social Media

Related Posts

Working with Files, Folders java
Working with Files, Folders java
March 25, 2015
1 min
Learn Pain Less  © 2024, All Rights Reserved.
Crafted with by Prolong Services

Quick Links

Advertise with usAbout UsContact Us

Social Media