Use Java 8 features.
Use methods like Integer.compare()
, Objects.requireNonNull()
and the static hashCode()
methods on all versions of Android, as the method implementations get added (or rewritten for Objects.requireNonNull()
) to the APK when Java 8 support is enabled:
Edited by Isira Seneviratne