Draymonders / Code-Life

The marathon continues though.
27 stars 3 forks source link

Java Basic #30

Open Draymonders opened 4 years ago

Draymonders commented 4 years ago
Draymonders commented 4 years ago

== 和 Equals

关于hashcode

此话讲的甚好 Objects that are equal (according to their equals()) must return the same hash code. It's not required for different objects to return different hash codes.

Draymonders commented 4 years ago

Java 接口的静态方法不会被继承

今天突然发现的,JDK的Map是个interface 有个静态方法 of, 然后用new HashMap<String, String>().of会报错

发现了新大陆

    A
   /  \
 /     \
B       C
 \     /
   \  /
    D