Why some java methods in core libraries end with numbers?

前端 未结 3 992
南方客
南方客 2020-12-08 05:17

It\'s common in a lot of classes in JDK, just a few examples:

  1. java.util.Properties
    • load0
    • store0
  2. java.lang.Thread
      <
3条回答
  •  情书的邮戳
    2020-12-08 05:38

    I believe they are named like that because equivalent functions with same names exist in the code and just to distinguish between native helper functions and public functions they decided to suffix them with 0.

    in java.util.Properties both load, store and load0, store0 exist.

提交回复
热议问题