当前位置:网站首页>2022-07-21 第四小组 修身课 学习笔记(every day)
2022-07-21 第四小组 修身课 学习笔记(every day)
2022-07-26 03:10:00 【修身课】
final关键字
最终的,终极的
final可以修饰的结构:
- 类 public final class
最终类,终极类
- 属性 private final String name
final修饰的常量不能改变
常量的命名规则:单词的所有字母都大写,如果是多个单词,用下划线分割,不能只声明不赋值
- 方法 private final void show
不能被重写
方法的重写注解
@Override
我们建议在方法的重写处表明重写的注解
祖先类:Object (最顶级父类)
如果一个类没有明确的写出它的父类是谁,那它的父类就是Object
Object类中有11个方法:
- hashCode( ):它的返回值实际上就是对象运行时的内存地址
hash算法:一般翻译“散列”,把任意长度的输入,通过一个散列的算法变换成固定长度的输出,输出结果
密码加密MD5加密
SHA家族
- equals( ):和==没区别,比地址,为了让子类重写
Integer内部,有一个缓冲区,把byte范围内的数缓存起来了
- toString( ):转换成字符串,当我们直接使用对象时,会默认调用toString方法,为了让子类重写
- finalize( ):垃圾回收的方法
- Clone( ):克隆,必须实现
总结
讲的不是很多,但是需要多加理解
边栏推荐
- 一切的源头,代码分支策略的选择
- [SQL] 自连接的用法
- 图解LeetCode——5. 最长回文子串(难度:中等)
- Unity quickly builds urban scenes
- Jsd-2204-cool shark Mall (Management Commodity module) -day02
- Leetcode · daily question · sword finger offer | | 115. reconstruction sequence · topological sorting
- The source of everything, the choice of code branching strategy
- LeetCode·每日一题·剑指 Offer || 115.重建序列·拓扑排序
- els 消息循环
- Win11 hide input method status bar method
猜你喜欢

STM32——PWM学习笔记

How to close the case prompt icon of win11? Closing method of win11 case prompt Icon

在混合云中管理数据库:八个关键注意事项

Win11更改磁盘驱动器号的方法

There are a group of students in the class who have got the test results in Chinese and mathematics. Please select the students whose total score is the first

Safety margin of mass consumption

Use eventlog analyzer for log forensics analysis

Opencv报错:(parameter or structure field))Unrecognized or unsupported array type in functon ‘cvGetMat‘

Opencv error: (parameter or structure field)) unrecognized or unsupported array type in functon 'cvgetmat‘

VR panoramic shooting and production of business center helps businesses effectively attract people
随机推荐
What is the difference between heap memory and stack memory?
An article allows you to understand the relevance of cloud native containerization
中国信通院陈屹力:降本增效是企业云原生应用的最大价值
Cloud native guide what is cloud native infrastructure
File operation (I) -- File introduction and file opening and closing methods
STM——EXTI外部中断学习笔记
Canvas - ECG design and how to clean the canvas
GoLang日志编程系统
els 初始化窗口类
如何用U盘进行装机?
canvas——绘制文本——饼图的修改
Opencv 在图像上进行标注(画框+写字)
Unity快速搭建城市场景
.net serialize enumeration as string
Opencv error: (parameter or structure field)) unrecognized or unsupported array type in functon 'cvgetmat‘
STM32——串口学习笔记(一个字节、16位数据、字符串、数组)
Is the galaxy VIP account opened by qiniu safe?
Opencv saves pictures in the specified format
Teach you to rely on management hand in hand
万维网、因特网和互联网的区别