Computer Applications
When is a constructor automatically invoked ?
Java Constructors
2 Likes
Answer
A constructor is automatically invoked when the object of a class is created.
Answered By
1 Like
Related Questions
What is a constructor ? What does it do ?
What is that class called which does not have a public constructor ?
Write two characteristics of a constructor.
Write a class specifier (along with its constructor) that creates a class student having two private data members : rollno and grade and two public functions init( ) and display( ).
(Do not write full definitions of member functions except for constructor).