Code:
import java.util.Random;

public class SortArray {
public static void main(String[] args) {

System.out.print("Input Array:");
System.out.println();

int row, col;
int[][] scores; // array declaration
scores = new int[5][5]; // creation of 5 x 5 array
Random random = new Random();

// fills a 5 x 5 array with random numbers between 0 and 9
for (row = 0; row < scores.length; row++){
    for (col = 0; col < scores[row].length; col++){
        scores[row][col] = random.nextInt(10);//0-9 , 9 included
    }
}

// prints the contents of the array
for (row = 0; row < scores.length; row++){
    for (col = 0; col < scores[row].length; col++){
        System.out.print( scores[row][col] + " ");
    }
System.out.println(); // moves to next line
}
System.out.println("result sorted");
for (col=0;col< scores[0].length; col++){
    for (int i=0;i<scores.length;i++)
        for (int j=i;j<scores.length;j++){
            if (scores[i][col]>scores[j][col]){
                int temp=scores[i][col];
                scores[i][col]=scores[j][col];
                scores[j][col]=temp;
            }
        }
}

// prints the contents of the array
for (row = 0; row < scores.length; row++){
    for (col = 0; col < scores[row].length; col++){
        System.out.print( scores[row][col] + " ");
    }
System.out.println(); // moves to next line
}

}

}
imagine that every column is a new array.
in this new array perform bubblesort.
do this for all columns.