?? stoplist.java
字號:
/* **** StopList.java ***********************************************
Implement stoplist as HashTable
**********************************************************************/
package drsystem;
import java.util.*;
import java.io.*;
class StopList extends Hashtable<String,String>
{
public StopList(String file) throws IOException
{
super(); //call to parent class constructor
try
{
BufferedReader Istream=new BufferedReader(new FileReader(file)); //create input stream
String word;
while((word=Istream.readLine())!=null) //read stopword in each line
put(word,word); // and put in into HashTable
Istream.close(); //close stream
} //end of try block
catch(NullPointerException e)
{
System.out.println("StopList.java: " + e.getMessage());
}
catch(FileNotFoundException e)
{
System.out.println("StopList.java: " + e.getMessage());
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -