一>java遍历Hashtabe: import java.util.Hashtable; import java.util.Set; public class HashTableTest { public static void main(String args[]){ Hashtable<String, String> ht = new Hashtable<String, String>(); ht.put("one", "The first
Java遍历文件夹的2种方法: A.不使用递归: import java.io.File; import java.util.LinkedList; public class FileSystem { public static void main(String[] args) { long a = System.currentTimeMillis(); LinkedList list = new LinkedList(); File dir = new File("c:\\java\\&quo
Java字符串是一系列的Unicode字符序列,但是,它却常常被误认为是char序列.于是,我们经常这样来遍历字符串: package testchar; public class TestChar2 { public static void main(String[] args) { String s = "\u0041\u00DF\u6771\ud801\uDC00"; for(int i = 0; i < s.length(); i++) { System.out.prin