Ask Your Question
1

What is the formal difference between construction and initialization?

asked 2022-06-30 11:00:00 +0000

huitzilopochtli gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-01-07 09:00:00 +0000

scrum gravatar image

Construction refers to the process of creating an object of a particular class, while initialization refers to the process of assigning initial values to the object's data members. Construction is the process of creating a new instance of a class, while initialization is the process of setting the initial state of that instance. Construction involves calling the constructor of the class, while initialization may involve using default values or values specified by the programmer. In general, construction is a broader term that includes initialization as one of its steps, but initialization is a more specific term that focuses on the assignment of initial values.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-06-30 11:00:00 +0000

Seen: 15 times

Last updated: Jan 07 '23