It's common in a lot of classes in JDK, just a few examples:
Usually they are private native methods (like in Thread class), but sometimes they are just private (Properties class)
I'm just curious if anybody know if there is any history behind that.
I think the history of this convention predates Java. I vaguely recall seeing it in C libraries in 4.x BSD Unix.
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.
store
and load
functions call the load0
and store0
after wrapping the parameters - Thirler 2012-04-04 07:52
The 0 after the method name is done so to distinguish between public and private methods having same name .
Start
function will call the start0
function.
Those functions which ends with 0 is private method.
And those which are not ending with number is public.
You can check in any of the library.