ExamVeda
Login
Home
Constructors and Methods
?

What is a constructor in Java?

Answer & Solution
Correct Answer: Option A
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

1 Comment
Manish J
Manish J 3 years ago
Constructor are special members of the class, each and every class has a constructor .
Constructor is called during the creation of the object(instance).
eg :
class Sample{ main method(){
Sample a=new Sample(); where a - reference variable , Sample() - ivoking the constructor