Helpful Information
 
 
Category: Java
Sending an array...?

I was wondering how i would get an array in a different class... for example

assume projects is an array


ListOfStudents[counter] = new Undergrad(projects);




public UnderGrad(projects)
{
}


how would i get that in the Undergrad part? because if it was an int i would need to put
public Undergrad(int projects)
but i dont knwo what to do for an array.
any help?

Depends on the type of the array. Assuming projects is an array of Project instances, you'd do:
public UnderGrad(Project[] projects) {
}

That got it. thanks!!!










privacy (GDPR)