Java :Compare two objects in Java with possible null values(5solution)

Published --