为什么核心库中的某些java方法以数字结尾? [英] Why some java methods in core libraries end with numbers?

查看:171
本文介绍了为什么核心库中的某些java方法以数字结尾?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这在JDK的很多课程中都很常见,只有几个例子:

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


  1. java.util.Properties


    • load0

    • store0


  • start0

  • stop0

  • setPriority0

通常它们是私有本机方法(如Thread类),但有时候它们只是私人(属性类)

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.

推荐答案

我认为这个大会的历史早于Java。我依旧记得在4.x BSD Unix的C库中看到它。

I think the history of this convention predates Java. I vaguely recall seeing it in C libraries in 4.x BSD Unix.

这篇关于为什么核心库中的某些java方法以数字结尾?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆