学习笔记
文章平均质量分 80
方纹
这个作者很懒,什么都没留下…
展开
-
7-18
7.序列化和反序列化 序列化和反序列化最常用的方式是将某个类实现Serializable接口,使用对象流进行相应的序列化和反序列化 重点需要注意的是 显式定义一个private static final long serialVersionUID且不要轻易修改这个值(达到向下兼容的目的) 使用transient修饰的变量,在序列化的时候会忽略他的值,在反序列化的时候会将其值设为初始值,int为0,引用类型为null /** *序列化和反序列化代码 * 重要的话说三遍,在定义某个类实现Seri原创 2021-10-20 18:20:47 · 66 阅读 · 0 评论 -
1-7
1. java.lang.String (1) replace()和replaceAll() 废话不多说直接上源代码 replace() /** * Replaces each substring of this string that matches the literal target * sequence with the specified literal replacement sequence. The * replacement proceeds from the原创 2021-10-17 16:50:04 · 107 阅读 · 0 评论