If a class named Student contains a method setID() that takes an int argument, and you write

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 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);

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Java Programming

ISBN: 978-1337397070

9th edition

Authors: Joyce Farrell

Question Posted: