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;
 return abc;
 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];
 return max;

How to optimize the code?

java 8:

int[] array = IntStream.range(0, 100).asArray();
 OptionalInt opt =;
 int max = opt.getAsInt();
 OptionalInt opt2 =, 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);