private static boolean eq(Object x,Object y){
  return x == y || x.equals(y);
}

private static boolean eq ( Object x , Object y ) { return x == y || x . equals ( y ) ; }
checks for equality of non - null reference x and possibly - null y . by default uses object . equals .
