public class Homework02 {
public static void main(String[] args) throws IOException {
String filePath = "E:\\aa.txt";
File file = new File(filePath);
String s ="";
int linecount=0;
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file),"gbk"));
while((s= br.readLine())!=null){
System.out.print((++linecount)+" "+s+"\n");
}
br.close();
}
}