subject

The following method is a Selection Sort method. Within the method, there is an error on one line. Your job is to find that line and fix that one error so that the method may work properly. You will need to understand exactly how a selection sort method works.
Examples:
selectionSort ({4,7,1} ->{1,4,7}
selectionSort ({80,6,6,8,2} >2,6,6,8,80 1

1 public int[] selectionSort(int [] array) {
2 for (int i 0; i < array . length 1; i++) {
3 int min = array[i];
4 int minIndex i;
5 for (int j = i + 1; j < array. length; j++) {
6 if (min > array [j];
7 minIndex = j;
8 }
9 if (minIndex == i) {
10 array [minIndex] = array [i];
11 array [i] = min;
12 }
13 }
14 return array;
15 }

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:40
It is vital to research each of the services you plan to disable before implementing any change, especially on critical machines such as the: a. servers in the test environment. b. domain controller and other infrastructure servers. c. desktops that have previously been attacked. d. desktops used by upper-level management.
Answers: 2
question
Computers and Technology, 24.06.2019 00:30
Use the keyword strategy to remember the meaning of the following word. the meaning for the word has been provided. write your keyword and describe the picture you would create in your mind. obfuscate: to make something so confusing that it is difficult to understand.
Answers: 2
question
Computers and Technology, 24.06.2019 03:30
Explain the importance of html in web page designing in 20 sentences..
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
What is not a type of text format that will automatically be converted by outlook into a hyperlink?
Answers: 1
You know the right answer?
The following method is a Selection Sort method. Within the method, there is an error on one line. Y...
Questions
question
Mathematics, 23.05.2020 10:58
question
English, 23.05.2020 10:58
question
Chemistry, 23.05.2020 10:58
Questions on the website: 13722367