资源简介
此段程序能自动生成通话记录
主叫+被叫+通话日期+通话时间
代码片段和文件信息
package com.it18zhang.callloggen;
import java.io.FileWriter;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.Date;
/**
*
*/
public class App {
static Random r = new Random();
public static List phoneNumbers = new ArrayList();
public static Map callers = new HashMap();
static{
callers.put(“15810092493“ “史玉龙“);
callers.put(“18000696806“ “赵贺彪“);
callers.put(“15151889601“ “张倩 “);
callers.put(“13269361119“ “王世昌“);
callers.put(“15032293356“ “张涛“);
callers.put(“17731088562“ “张阳“);
callers.put(“15338595369“ “李进全“);
callers.put(“15733218050“ “杜泽文“);
callers.put(“15614201525“ “任宗阳“);
callers.put(“15778423030“ “梁鹏“);
callers.put(“18641241020“ “郭美彤“);
callers.put(“15732648446“ “刘飞飞“);
callers.put(“13341109505“ “段光星“);
callers.put(“13560190665“ “唐会华“);
callers.put(“18301589432“ “杨力谋“);
callers.put(“13520404983“ “温海英“);
callers.put(“18332562075“ “朱尚宽“);
callers.put(“18620192711“ “刘能宗“);
phoneNumbers.addAll(callers.keySet());
}
public static void main(String[] args) throws Exception {
if(args == null || args.length == 0){
System.out.println(“no args“);
System.exit(-1);
}
genCallLog(args[0]);
}
public static void genCallLog(String logFile) throws Exception {
// FileWriter fw = new FileWriter(“G:\小象学院\大数据\“true);
FileWriter fw = new FileWriter(logFiletrue);
while(true){
//取主叫
String caller = phoneNumbers.get(r.nextInt(callers.size()));
//主叫名字
String callerName = callers.get(caller);
//被叫号
- 上一篇:腾讯人脸识别demo
- 下一篇:android仿淘宝收货地址demo
评论
共有 条评论