Interviews - C# Corner

Rohit Gupta
What do you mean by Constructor in Java? How do we define that?
By Rohit Gupta in Java onSep 10 2019
  • Vijay Kumari
    Sep, 2019 16

    A constructor is like a special method in Java, which is used to initialize an object of a Java class and Constructor is very important for every Java class and if we don’t declare the constructor, the compiler creates a default constructor of a Java class.

    A constructor must be the same name of a Java class. It does not have a return type.

    For a detailed tutorial on Constructors in Java, visit
    https://www.c-sharpcorner.com/article/a-complete-java-classes-tutorial/

    • 1
  • Улисзс Рико
    Sep, 2019 11

    It's the inner method of a class the let the class be created, it has the same name of the class and it may have parameters or not.

    • 0

Most Popular Companies

Most Popular Job Functions

MOST LIKED QUESTIONS