map-file
来源:互联网 发布:java酒店管理系统源码 编辑:程序博客网 时间:2024/05/21 09:55
import java.io.BufferedReader;import java.io.FileOutputStream;import java.io.FileReader;import java.io.IOException;import java.util.HashMap;import java.util.Map;import java.io.File;import java.util.*;public class teststudy { public static void main(String[] args) { String targer= "i am test java study, i am test java study"; String tmp[] = targer.split(" "); Map<String, Integer> testMap= new HashMap<String, Integer>(); int i; for(i =0 ;i<tmp.length;i++) { if(testMap.containsKey(tmp[i])) { int num=testMap.get(tmp[i]); testMap.put(tmp[i], ++num); } else { testMap.put(tmp[i],1); } } System.out.println(testMap); System.out.println(testMap.keySet()); System.out.println(testMap.size()); System.out.println(testMap.getClass()); File f = new File("."); File[] filelist = f.listFiles(); int i = 0; for(i = 0; i< filelist.length; i++) { if(filelist[i].isDirectory()) { System.out.println("dir"+filelist[i]); } if(filelist[i].isFile()) { System.out.println("file"+filelist[i]); } else { System.out.println("1111111111111"); System.out.println(filelist[i]); } } File creatfile = new File("a..txt"); if(creatfile.exists() && creatfile.isFile()) { creatfile.delete(); } creatfile.createNewFile(); if(creatfile.canRead()) { BufferedReader bf = new BufferedReader(new FileReader(creatfile)); String str = bf.readLine(); System.out.println(str); } String str[][] ={{"i"},{"am"},{"student"}}; String strbak[][] = new String[3][]; System.arraycopy(str,0,strbak,0,3); for(int i=0; i< str.length;i++) { for(int j=0; j<str[i].length;j++) { System.out.println(str[i][j]); } } }} class testThread extends Thread{ long min; public testThread(long min) { this.min = min; } public void run() { for(int i=0 ; i< min; i++) { if(min%2 ==0) { System.out.println("thread1 say:"+min); } else { min--; } } }}
- map-file
- file map
- file map
- The System.map File
- Error opening map file
- delphi MAP FILE
- File Map Study
- The system.map File
- The system.map File
- mmap1-map the ordinary file
- mmap2-map the ordinary file
- mmap5-map the struct file
- apache+tomcat static file map
- xcode : map file not found
- 第十五节Map和File
- The system.map File (ystem.map文件)
- WARNING Couldn't open font map file kanjix.map
- Finding crash information using the MAP file
- sqlserver链接超时
- 算法复习之:N^2排序
- 临时表和表变量,转载自博客园
- Windows Phone开发(45):推送通知大结局——Raw通知
- ESI 动态缓存技术
- map-file
- 学习Javascript闭包
- 创建更新物化视图的Job
- 如何在 Linux 服务器上安装 Red5?
- vs2008 ALT + G解释
- HAXE --- One language, everywhere
- java排序算法汇总
- Yii核心应用组件
- Paint类介绍