What are constructors in Java?

Total Post:83

Points:415
Java 
 453  View(s)
Ratings:
Rate this:
  1. Post:83

    Points:415
    What are constructors in Java?

    In Java, constructor refers to a block of code similar to a method that’s called when an instance of an object is created. A constructor in Java must have the same name as that of the class. And it’s called automatically when a new instance of an object is created. Constructors are not considered as members of a class.

Answer