✏️ Explanatory Question

Rules for creating Java constructor

👁 697 Views
📘 Detailed Answer
697
Total Views
10
Related Qs
0%
Progress
💡

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