If Object1 And Object2 Are Objects Of The Same Class, To Make Object2 A Copy Of Object1

(Correct Answer Below)

Reveal the answer to this question whenever you are ready.

If Object1 And Object2 Are Objects Of The Same Class, To Make Object2 A Copy Of Object1

use the Java copy method that is a part of the Java language assign object1 to object2, such as object2 = object1; use the default constructor to create object2 with object1 data members write a copy method that will make a field by field copy of object1 data members into object2 data members
Front

Advertisement

write a copy method that will make a field by field copy of object1 data members into object2 data members

About the flashcard:

This flashcard is meant to be used for studying, quizzing and learning new information. Many scouting web questions are common questions that are typically seen in the classroom, for homework or on quizzes and tests. Flashcards vary depending on the topic, questions and age group. The cards are meant to be seen as a digital flashcard as they appear double sided, or rather hide the answer giving you the opportunity to think about the question at hand and answer it in your head or on a sheet before revealing the correct answer to yourself or studying partner. Some questions will include multiple choice options to show you the options involved and other questions will just have the questions and corrects answers. Simply reveal the answer when you are ready to check your work. Absolutely no cheating is acceptable.