+ 3
Depends on the language. Some languages have a method to find the biggest number in a array like C# eg
int[] array1 = {13,42,56};
Console.WriteLine(array1.Max());
Output would be 56
In java i don't think you have a predefined method. You can create a method like this:
public int maxValue(int array[]){
List<Integer> list = new ArrayList<>();
for (int i = 0; i < array.length; i++) {
list.add(array[i]);
}
return Collections.max(list);
This method will add your array numbers to a list which has a max() method.