I am trying to compare two int values with a method.
I have put two get methods after each other because the array[i] is a list of person objects and gethouse only gives the house object, the houseid is in another class.
I'm wondering if I can set up two get() methods after each other?
public Person findperson( int houseId ){
for ( int i = 0; i < array.length; i++ ){
if ( array[ i ].gethouse().gethouseID() == houseId ){
return array[ i ];
}
}
return null;
}