Operator == and equals () method

1. The operator ==

  • Variables are two basic types of data, and the numeric types are (not necessarily require the same strict data type), as long as the two variables are equal, returns true.
  • Two reference type variable, only when they point to the same object, == will return true. == no two objects can not be used on the parent-child relationship of the type of comparison.

     

     

Guess you like

Origin www.cnblogs.com/quanhaijie/p/12165927.html