- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Type of Java constructors
There are two types of constructor java supports −
- Default constructor: A constructor with no arguments
- Parameterized constructor: A constructor with parameters.
Example
public class Puppy { //Default constructor public Puppy() { } //Parameterized constructor public Puppy(String name) { // This constructor has one parameter, name. } }
- Related Articles
- Constructors of StringBuffer class in Java.
- Constructors of StringBuilder class in Java.
- Constructors of StringTokenizer class in Java.
- Constructors in Java\n
- Get all Constructors in Java
- Java Interview Questions on Constructors
- What are constructors in Java?
- Can interfaces have constructors in Java?
- Can constructors be inherited in Java?
- What are Default Constructors in Java?
- Are Multiple Constructors possible in Java?
- What are copy constructors in Java?
- What are parametrized constructors in Java?
- Java Program to implement private constructors
- How many types of constructors are there in Java?

Advertisements