代码很简单,不做任何解释
package com.dsr.phone;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class phone {
List<books> listbook = new ArrayList<books>();
Scanner sc = new Scanner(System.in);
boolean startsingle = true;
private String name;
private String num;
static File f = null;
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
phone p = new phone();
f = new File("d:/phone.txt");
if (!f.exists()) {
f.createNewFile();
} else {
p.readbook();
}
p.run();
}
private void run() throws IOException {
// T