Monday 15 September 2014

Does Java have generic test for equality that also handles nulls? -


Is there any static similarity function anywhere in the Java standard libraries?

  public stable   

I have applied it to execute a new project Util class. Unbelievably, it will not ship as a standard library function ...

In JDK 7 From Javadoc:

Returns are true if arguments are equal to one another and otherwise wrong. As a result, if both the logic is zero, then the truth is returned and if a logic is meaningless, then false is returned. Otherwise, equality is determined using the same method of the first argument.

In addition to the work already mentioned in Apache Commons Lang, Google Guva also has one:

No comments:

Post a Comment