number to both arrays
int nextInt = r.nextInt(1000);
numsToSort1[i] = nextInt;
numsToSort2[i] = nextInt;
}
ct.stop();
System.out.println("Took: " + ct.getElapsedTime() + " seconds to create the arrays");
ct.start();
int min;
// iterate double for loop for sort
print array in rectangular form
for (int i=0; i<srcarray.length; i++) {
for (int j=0; j<srcarray[i].length; j++) {
System.out.print(" " + srcarray[i][j]);
}
System.out.println("");
}
}
/*sun of a matrix*/
public int getSumOfAllElements()
{
int sum=0;
for (int i=0; i<srcarray.length; i++) {
public static void selectionSort(int[] arrayToSort)
{
// begin by entering into a for loop to examine all elements
for (int i = 0; i < arrayToSort.length; i++)
{
// we want to ensure that this is the lowest possible value of all elements that come