摘要:
数据均匀用插值,不均匀用二分,否则和线性查找差不多 public class InterpolationSearch { public static void main(String[] args) { int[] arr = {0,1,2,3,4,5,6,7,8,9,1000000000}; in 阅读全文
摘要:
public class ShellSort { public static void main(String[] args) { int[] arr = new int[] {9,8,7,6,5,4,3,2,1,0}; shellSort(arr); System.out.println(Arra 阅读全文
摘要:
原hello.txt文件中的内容:abcdefghijklmn 想要实现的效果是,将xyz插入到abc后面,将文件内容变成:abcxyzdefghijklmn 阅读全文
摘要:
RandomAccessFile实例化时,需要设置读写模式 示例:复制文件 RandomAccessFile写入数据的特点:从头开始逐个覆盖原文件的内容 原hello.txt中的内容为:abcdefghijklmn 写入xyz后,文件内容为:xyzdefghijklmn 阅读全文
摘要:
序列化 反序列化 自定义的Person类。 1.实现Serializable接口, 2.提供序列版本号serialVersionUID, 3.类的属性也必须是可序列化的。 4.其中static(类所有)和transient修饰的属性不会被序列化。 阅读全文
摘要:
序列化 反序列化 阅读全文
摘要:
写入数据 读取数据 阅读全文