Question: If a class named Student contains a method setID() that takes an int argument, and you write an application in which you create an array
If a class named Student contains a method setID() that takes an int argument, and you write an application in which you create an array of 20 Student objects named scholar, which of the following statements correctly assigns an ID number to the first Student scholar?
a. Student[0].setID(1234);
b. scholar[0].setID(1234);
c. Student.setID[0](1234);
d. scholar.setID[0](1234);
Step by Step Solution
3.26 Rating (158 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
