zoukankan      html  css  js  c++  java
  • Effective Java 英文 第二版 读书笔记 Item 10:Always override toString

    for example,PhoneNumber@163b91  class name+@+unsigned hexadecimal representation of hashcode.

    define: a concise but informative representation that is easy for a person to read

    providing a good toString implementation makes your class much more pleasant to use.

    when practical,the toString method should return all of the interesting information contained in the object

    whether or not you decide to specify the format,you should clearly document your intentions.

    for example:

    provide programmatic access to all of the information contained in the value returned by toString.

    总体感觉:需要利用toString 来描述对象时候才重载,感觉应用机会比较少

  • 相关阅读:
    Nacos深入浅出(四)
    Nacos深入浅出(三)
    Nacos深入浅出(二)
    Nacos深入浅出(一)
    Mycat(1)
    redis事务
    git常用的方式
    redis主从复制
    redis持久化RDB和AOF
    Quartz
  • 原文地址:https://www.cnblogs.com/linkarl/p/5568105.html
Copyright © 2011-2022 走看看