Ask Question

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. 8 May, 03:51
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers