Assign a value to an array and get the maximum value in the array. java code optimization

  java, question
Assign a value to an array
 public static int[] setValue(){
 int[] abc = new int[100];
 for(int i=0;  i<100;  I plus)
 abc[i] = i;
 bracket
 return abc;
 bracket
 
 Gets the maximum value in the array
 public static int findMax(int[] abc){
 int max = abc[0];
 for(int i=0;  i<abc.length;  I plus)
 if(abc[i]>max) max=abc[i];
 bracket
 return max;
 bracket

How to optimize the code?

java 8:

int[] array = IntStream.range(0, 100).asArray();
 
 OptionalInt opt = Arrays.stream(array).max();
 int max = opt.getAsInt();
 //or
 OptionalInt opt2 = Arrays.stream(array).reduce((a, b)->a>b ?   a : b);
 int max2 = opt2.getAsInt();
 
 //If there is already an array, it can be initialized as follows:
 int[] array2 = new int[100];
 IntStream.range(0, array2.length).forEach(n->array2[n]=n);