Not used Arrays.sort, what's the problem?

Not sorted array objects, what's the salt?

import java.util.Arrays;

public class Testing {
public static void main(String[] args) {
String [] flower = {"Mary, Anton, Peter, IDE, yuzya, 1Антон"};
java.util.Arrays.sort(nonna);
System.out.println(Arrays.toString(nonna));
}

}

Displays the same as and defined in massive
July 2nd 19 at 17:37
1 answer
July 2nd 19 at 17:39
Solution
Hello!!!
First array, not String.
What? - sheridan.Bergnaum commented on July 2nd 19 at 17:42
String [] flower = {"Mary, Anton, Peter, IDE, yuzya, 1Антон"}; only one element. It is impossible to sort. - barney.Schroeder90 commented on July 2nd 19 at 17:45
final String[] flower = { "Mary", "Anton", "Peter", "IDE", "yuzya", "1Антон" }; - barney.Schroeder90 commented on July 2nd 19 at 17:48
: can be more?) - sheridan.Bergnaum commented on July 2nd 19 at 17:51
: You have a single element in the array: "Mary, Anton, Peter, IDE, yuzya, 1Антон" - barney.Schroeder90 commented on July 2nd 19 at 17:54
many thanks, all understood) - sheridan.Bergnaum commented on July 2nd 19 at 17:57

Find more questions by tags JavaArraysAlgorithms