+ 10

ArraySort

hi, i have an array of object that implements the interface misurable. I need to understand how to order the elements of this array. I have seen a video in that the tutor did that with the use of a lambda expression, but when i try to use it doesn t work.

11th Sep 2017, 12:57 PM
Davide Mazzeo
Davide Mazzeo - avatar
1 Respuesta
+ 8
You mean Measurable? Try using a Comparator: http://www.codejava.net/java-core/collections/sorting-arrays-examples-with-comparable-and-comparator Read the full article to make sure you understand what's going on. Then you'll be able to apply that to your code.
11th Sep 2017, 2:22 PM
Tashi N
Tashi N - avatar