急求JAVA小程序代码(20分重赏)

发布网友 发布时间:2022-04-24 03:15

我来回答

1个回答

热心网友 时间:2023-10-24 06:34

try{
final int EOF = -1;
HashTable h = new HashTable();
Reader r = new FileReader(new File(args[0]));
int c = r.read();
while (c != EOF){
System.out.print((char)c); // 未作缓冲
Character key = new Character((char)c);
Object count = h.get(key);
if (count == null){count = new Integer(1);}
else {count = new Integer(((Integer)count).intValue + 1);}
h.put(key, count);
c = r.read();
}
}catch{...}

热心网友 时间:2023-10-24 06:33

try{
final int EOF = -1;
HashTable h = new HashTable();
Reader r = new FileReader(new File(args[0]));
int c = r.read();
while (c != EOF){
System.out.print((char)c); // 未作缓冲
Character key = new Character((char)c);
Object count = h.get(key);
if (count == null){count = new Integer(1);}
else {count = new Integer(((Integer)count).intValue + 1);}
h.put(key, count);
c = r.read();
}
}catch{...}

热心网友 时间:2023-10-24 06:33

try{
final int EOF = -1;
HashTable h = new HashTable();
Reader r = new FileReader(new File(args[0]));
int c = r.read();
while (c != EOF){
System.out.print((char)c); // 未作缓冲
Character key = new Character((char)c);
Object count = h.get(key);
if (count == null){count = new Integer(1);}
else {count = new Integer(((Integer)count).intValue + 1);}
h.put(key, count);
c = r.read();
}
}catch{...}

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com