Write a method that accepts an integer array as a parameter and sorts it using the bubble sort algorithm.

What will be an ideal response?


```
public void bubbleSort(int[] array)
{
int temp;
for(int i = array.length-1; i >;=0; i--)
{
for(int j = 0; j < i; j++)
{
if(array[j] < array[j+1])
{
temp = array[j];
array[j] = array[j+1];
array[j+1] = temp;
}//end if
}//end for j
}//end for i
}
```

Computer Science & Information Technology

You might also like to view...

Before typing text on the stage, you must create a text ____.

a. flow b. index c. pointer d. container

Computer Science & Information Technology

What does this symbol represent [ ]?

A) either/or situation B) optional C) iteration D) selection

Computer Science & Information Technology

____________________ refers to the process of identifying the feasibility and impact of an attack or intrusion of a system by simulating active exploitation and executing potential attacks within that environment.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

A program feature that grants access to certain functions only to visitors with the appropriate rights is a(n):

A) administration function. B) authentication value. C) session form. D) password.

Computer Science & Information Technology