Provide an ADT java class for one-dimension arrays named “MyArray”
publicvoidsum_elements(){int[] myArray =newint[3];
myArray[0]=1;
myArray[1]=3;
myArray[2]=5;int sum =0;for(int i =0; i < myArray.length; i++){
sum += myArray[i];}System.out.print(sum);}