162k views
3 votes
JAVA

Given an array of Student names, create and return an array of Student objects.

I wrote some code but I'm not sure if I'm doing this right (see the attachment).

JAVA Given an array of Student names, create and return an array of Student objects-example-1
User Jickson
by
5.2k points

1 Answer

0 votes

Answer:

Answer is in the attached screenshot!

Step-by-step explanation:

Iterate through the given input strings, create a student class with the given name, assign the output array to the value of the class created from the given input string. Finally, return the array.

JAVA Given an array of Student names, create and return an array of Student objects-example-1
User Shazbot
by
5.3k points