I think something wrong with my Bubble sort

Code java:

<import java.util.Scanner;
public class RockefellerA7 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Please Enter Number of Rows: ");
int row = input.nextInt();
System.out.println("Please Enter Number of Columns: ");
int column = input.nextInt();
int [][] arr = new int[row][column];
System.out.println("Enter Values: ");
for(int i = 0; i < arr.length; i++){
for(int j = 0; j < arr[i].length; j++){
arr[i][j] = input.nextInt();
}
}
boolean swapped = false;
do {
swapped = false;
for(int i = 0; i < arr.length-1; i++){
for(int j = 0; j< arr[i].length-1; j++){
if (i== arr.length - 1 && j== arr.length-1){
}
else if (j == arr[i].length-1){
if (arr[i][j]> arr[i][0]){
int temp = arr[i][0];
arr[i][0] = arr[i+1][0];
arr[i+1][0] = temp;
swapped = true;
}
}
else {
if(arr[i][j] < arr[i+1][j+1]){
int temp = arr[i][j];
arr[i][j] = arr[i+1][j+1];
arr[i+1][j+1] = temp;
swapped = true;
}
}
}
}
}
while (swapped);
for (int i = 0; i < arr.length; i++){
for (int j = 0; j < arr[i].length; j++){
System.out.printf("%4d", arr[i][j]);
}
System.out.println();
}
}
}
>

I am entering {25,8,12,13,5,3,88,0,2,1,92,4}

and my output is:

92 88 12 13

5 22 8 0

2 1 3 4

Here is my program. I have to sort my array so it will go smallest to largest but it isnt working HELP

three conditions it has to fill:

1. if Iis the row size -1 and j is the column -1 do nothing

2. else if j is the column size -1 check the values and swap

3. other wise just check the values and swap

Re: I think something wrong with my Bubble sort

Please explain what "isnt working" means. Post the program's output and add some comments describing what is wrong with the output and show what it should be.

For easier testing and to ensure everyone is testing with the same values, define the arr array with numbers for testing and comment out getting the numbers from the user.

For example:
Code :

arr = {{2,3,4},{4,5,6}, {5,4,3}};

Please edit your post and wrap your code with

[code=java]

<YOUR CODE HERE>

[/code]

to get highlighting and preserve formatting.