Provide an ADT java class for one-dimension arrays named “MyArray”
public void sum_elements(){
int[] myArray = new int[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);
}