1234567891011121314151617181920212223242526272829303132 |
-
-
-
- public class LargestInteger {
-
- public Integer findLargestNumberUsingConditional(Integer[] integers){
- int large = integers[0];
-
- for (int i = 0; i < integers.length ; i++){
- if (large < integers[i]){
- large = integers[i];
-
-
- }
-
- }
-
-
-
-
-
- return large;
- }
-
- public Integer findLargestNumberUsingMathMax(Integer[] integers){
-
-
-
- return Math.max(integers[0], Math.max(integers[1], integers[2]));
- }
- }
|