w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Why does my sorting function produce such an unusual output?

You're on the right track. However, how will the compiler know that your Human class is Comparable? You must not only provide the method compareTo(), but also put implements Comparable at the beginning.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.