Assign to variable: keyword new, followed by class name, followed by ().
Determine whether parameter(s) are appropriate (API)
Number of parameters
Data types of the parameters
Subsection4.6.1
ExercisesExercises
1.
Q9: Given this code, how many items are in mine?
Widget mine = new Widget();
2.
Q10: Given this code, how many items are in yours?
Widget yours = new Widget(7);
Because we do not have an implementation of the Widget class, there is no import statement in the ActiveCode box below, and you will not be able to execute the above code.