What is a constructor in Java?
A. A method that is used to create objects of a class.
B. A method that is used to destroy objects of a class.
C. A method that is used to modify objects of a class.
D. None of the above
Answer:A
What is a constructor in Java?
A. A method that is used to create objects of a class. B. A method that is used to destroy objects of a class. C. A method that is used to modify objects of a class. D. None of the above