×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • About
  • One Liner
  • RANDOM
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓

constructor

A collection of 2 posts

Software Engineering

Master the use of Constructors in Java

In Java, a constructor is a block of code similar to a method which is used to initialize objects. It is called when an instance of a class is created.

Ananyashree
C++

constructor in C++

A constructor is a member function of a class which initializes objects of a class. In C++, Constructor is automatically called when object(instance of class) is created it is considered to be a special member function of the class.

Harshita Sahai Harshita Sahai
OpenGenus IQ © 2026 All rights reserved â„¢ [email: team@opengenus.org]
Top Posts LinkedIn Twitter