I have following array and I want to find the largest value in it. I know I can write a for loop and get the max value. But is there some read made method that Java provides for this very task
int []array = new int[10];
for(int i=0;i<10;i++)
array[i] = i;