I am trying to use the Objects.equals(obj a, obj b)
method (link) in Android, but it seems Android does not have access to it. As far as I'm aware, this class was available in Java 1.7 and later. Is there any way to have access to this class in Android? Or is there an equivalent method that behaves the same way that I can use instead?
Objects.equals()
has the following source:
public static boolean equals(Object a, Object b) {
return (a == b) || (a != null && a.equals(b));
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With