✏️ Explanatory Question

Rules for creating Java constructor

👁 701 Views
📘 Detailed Answer
💡

Answer with Explanation

There are two rules defined for the constructor.

  1. Constructor name must be the same as its class name
  2. A Constructor must have no explicit return type
  3. A Java constructor cannot be abstract, static, final, and synchronized