S
S
Sergey Solovyov2016-11-11 18:27:28
Java
Sergey Solovyov, 2016-11-11 18:27:28

Arrays.sort is not applied, what's the problem?

Array objects are not sorted, what's the point?
import java.util.Arrays;
public class Testing {
public static void main(String[] args) {
String [] nonna = {"Masha, Anton, Peter, Yazya, Yuzya, 1Anton"};
java.util.Arrays.sort(nonna);
System.out.println(Arrays.toString(nonna));
}
}
The output is the same as given in the array

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
al_gon, 2016-11-11
@Sereja_Kamila

Kuku!!!
Array first, not String.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question