Ask Question
9 May, 14:48

When defining an array of class objects, how do you pass arguments to the constructor for each object in the array?

+4
Answers (1)
  1. 9 May, 15:59
    0
    Basically, the array[ index ] is the name of the object so when you populate the array you'd have statement[s] like:

    array[ index ] = new ClassName (arg0, arg1, arg2);
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “When defining an array of class objects, how do you pass arguments to the constructor for each object in the array? ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers