Java API说白了就是JDK提供给我们简化编程的东西。
API(Application Programming Interface,应用程序编程接口)是一些预先定义的函数,目的是提供应用程序与开发人员基于某软件或硬件得以访问一组例程的能力,而又无需访问源码,或理解内部工作机制的细节。
编写一个机器人程序去控制机器人踢足球,程序就需要向机器人发出向前跑、向后跑、射门、抢球等各种命令,没有编过程序的人很难想象这样的程序如何编写。但是对于有经验的开发人员来说,知道机器人厂商一定会提供一些用于控制机器人的Java类,这些类中定义好了操作机器人各种动作的方法。其实,这些Java类就是机器人厂商提供给应用程序编程的接口,大家把这些类称为Xxx Robot API。
我们先来看最基本的类Object,最好的学习材料-官方API,这里提供一个我的API云盘链接,请叫我红领巾。
百度云链接:https://pan.baidu.com/s/1pLLCzbX
java.lang.Object
Since:JDK1.0
Class Object is the root of the class hierarchy. Every class has Object as a superclass. All objects, including arrays, implement the methods of this class.
int | hashCode()
Returns a hash code value for the object.
|
-
public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided byHashMap.The general contract of hashCode is:
- Whenever it is invok