java 总结

equals vs ==
 
equals : always remember to override hashCode if you override equals so as not to "break the contract".  if equals. the hashCode must be same.

== :  it returns true if both variables refer to the same object, if their references are one and the same.

 

why in the abstract class, can not have static , native, synchronized methods 

static : Because "abstract" means: "Implements no functionality", and "static" means: "There is functionality even if you don't have an object instance". And that's a logical contradiction.


native: 

 

 

 

posted on 2013-12-21 08:07  brave_bo  阅读(298)  评论(0)    收藏  举报

导航