✏️ Explanatory Question

Types of Java constructors in Java

👁 567 Views
📘 Detailed Answer
💡

Answer with Explanation

There are two types of constructors in Java:

  1. Default constructor (no-arg constructor): A constructor is called Default Constructor when it does not have any parameter.
  2. Parameterized constructor: A constructor which has a specific number of parameters is called a parameterized constructor.