public class ArrayMethods {
double[] array = new double[5];
//swap the first and last elements in the array
public void swap () {
array[0]=array[4];
array[4]=array[0];
System.out.print(array);
}
}
Here is my code so far. And this is what it is spiting out with of course random numbers
Original: [D@15db9742
[D@15db9742
but I want it to spit out
Original: 159742
259741