I am trying to put multiple numbers into a min and max method. I know that in a min and max method only two methods are allowed. However, I have more than two numbers and I don't have a clue what I'm doing.
This code is also on reply.it:
int age5 = 75;
int age6 = 62;
int age7 = 89;
int age8 = 90;
int age9 = 101;
int youngestAge = Math.min()
int oldestAge = Math.max()
Math.min(Math.min(age5, age6), age7)or make your own.minand finding the smallest number between two of the elements, and then the result of that is passed to the outer call tominand compared toage7