Effective Java第二版变更之 General Programming

    第2版 General Programming

    Item 45: Minimize the scope of local variables

    Item 46: Prefer for-each loops to traditional for loops
    新增条目,增加了对新的语言特性的for-each的讲解,以及什么时候使用这个特性比较好的说明。

    Item 47: Know and use the libraries

    Item 48: Avoid float and double if exact answers are required

    Item 49: Prefer primitive types to boxed primitives
    新增条目。引入自动装箱拆箱是一个有利有弊的事情。大部分情况下还是Primitive比较好用。

    Item 50: Avoid strings where other types are more appropriate

    Item 51: Beware the performance of string concatenation

    Item 52: Refer to objects by their interfaces

    Item 53: Prefer interfaces to reflection

    Item 54: Use native methods judiciously

    Item 55: Optimize judiciously

    Item 56: Adhere to generally accepted naming conventions

你可能感兴趣的:(java,performance)