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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 02:00, alexabessin
Aisha has finished working on a word processing document that contains 15 pages. she has added some special elements in the first three pages, page 9 and 10, and page 15 from the document. she wants to print only these pages to see how they look. which option is the correct way to represent (in the print dialog box) the pages that aisha wants to print?
Answers: 3
image
Computers and Technology, 22.06.2019 21:00, jennifer7037
Ulia is planning to attend the same private four-year college her parents attended. she wants to save at least $18,000 in four years to contribute to her college education. which monthly deposit amounts can julia use to achieve her goal? check all that apply.
Answers: 2
image
Computers and Technology, 23.06.2019 06:20, Ab20600
Which text function capitalizes the first letter in a string of text? question 10 options: upper capital first proper
Answers: 1
image
Computers and Technology, 23.06.2019 13:30, carolelai08
Stops: using the information learned in this course, explain three things you will not do when driving. a. b. c. explain why you will not do these things when driving. starts: using the information learned in this course, explain three things you will do when driving. a. b. c. explain why you will do these particular things when driving. explain one thing you will stop doing as a passenger. explain one thing you will start doing as a passenger.
Answers: 3
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 in other subjects: