java-se object
来源:互联网 发布:java ssh jar 编辑:程序博客网 时间:2024/04/25 22:42
object 是 java 基类;
object 有clone, hashcode,equals,notify,notifyall, wait 等方法
以下 讨论默认提供的方法,重写的方法 pass;
clone :a native function,u can't use directly;direct use will clone a object from super class; and throw out CloneNotSupportedException
u need implements Clonenable interface, it will be work fine;
hashcode : default return is memory address;
collection applying this feature, to store the elements;first calculate hash-code and set it to the addr(hash-code address);
equals: checking object address whether equal;(== is checking param equal and equals func is checking object )
more simply -> equals compare the object contents , == compare object memory address;
the relation between hashcode and equals;
if 2 object equals it has same hashcode;
if 2 object not equals it is also can have same hashcode (case: hash conflict)
wait,notify,notifyall :thread operating function, wait will give up the thread lock,
- java-se object
- 【JAVA SE】22.Object类
- Java SE 2nd day:Object-oriented 01
- Java SE 3rd day:Object-oriented 02
- Java SE 4th day:Object-oriented 03
- Java SE 5th day:Object-oriented 04
- Java Se----常用类(内部类、Object类)
- java se
- Java SE
- java se
- java se
- java se
- JAVA SE
- JAVA SE
- 《Java SE》初学Java
- 【Java SE】认识Java
- Java SE 中的技术
- Java SE 简单介绍
- 自定义配置 Ribbon 【负载均衡策略】
- NAO学习笔记2--获取视频并展示
- 图像风格迁移-Image Style Transfer Using Convolutional Neural Networks
- 河南省多校连萌(一) E题【kruskal】
- SpringMVC与Struts2区别与比较总结
- java-se object
- python015 Python3 函数
- 运行shell脚本的三种方式
- 14个常用的javaScript正则表达式
- 刷题记录luoguP1972 [SDOI2009]HH的项链
- 最大公约数算法
- 宏定义中的反斜杠"\"和宏定义的细节说明
- STM32控制步进电机实现精确转动
- 静态代码块,构造代码块,构造方法的加载执行顺序研究