Could someone explain how it works?
how this part sort numbers in arraylist?
Arrays.sort(list);
for(int j = 0; j<list.length; j++) {
System.out.println(list[j]);
}
how it works?
Resolved
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
Anthony Chalk
3 February 2020, 22:51
All java classes come with default methods that you can call.
sort is a method of the Arrays class
https://docs.oracle.com/javase/7/docs/api/java/util/Arrays.html#sort(int[])
If your question is "what's the code Java used to write this method?", here's what it says in the library
what does that all mean? I have no idea :) +2