Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

readme.md

Chapter 3. Methods Common to All Objects(对象的通用方法)

本章将告诉你何时以及如何覆盖 Object 类的非 final 方法。虽然 Comparable.compareTo 不是 Object 类的方法,但是由于具有相似的特性,所以本章也对它进行讨论

Item 12: Always override toString(始终覆盖 toString 方法)

Item 13: Override clone judiciously(明智地覆盖 clone 方法)