Can someone please help me how to solve it?
Create a new class named blabla in the bla package. An instance of the class should be able to store a two-dimensional array of type double. The size of the array is not bound. The class should have a no-parameter procedure-like method named sortRows. The method should sort rows of the array in the following manner: the values of the last column must be in a descending order (greatest first, smallest last).
So i tried to do myself, please help me if there is a mistake.
double temp = 0;
double[][] number;
boolean fixed=false;
while(fixed==false){
fixed=true;
}
number = new double[5][5];
for(int i=0; i<number.length-1; i++){
if(number[i][i] > number[i+1][i+1])
temp = number[i+1][i+1];
number[i+1][i+1] = number[i][i];
number[i][i]=temp;
fixed=false;
}
for(int i=0; i<number.length; i++){
System.out.println(number[i][i]);
}