...
public int getMaxAge() {
int[] stuAge = {18,23,21,19,25,29,17};
int max = 0;
for(int i:stuAge)
{
max = max>=i ? max : i;
}
return max;
}
...
...
public int getMaxAge() {
int[] stuAge = {18,23,21,19,25,29,17};
int max = 0;
for(int i:stuAge)
{
max = max>=i ? max : i;
}
return max;
}
...