What is a constructor? Explain advantage of constructor with the help of an example

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter4: More Object Concepts
Section: Chapter Questions
Problem 10RQ
icon
Related questions
Question
What is a constructor? Explain advantage of constructor with the help of an example
Transcribed Image Text:What is a constructor? Explain advantage of constructor with the help of an example
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer