返回列表 發帖
本帖最後由 陳泓瑜 於 2018-6-23 11:34 編輯
  1. import java.io.BufferedReader;
  2. import java.io.FileInputStream;
  3. import java.io.FileNotFoundException;
  4. import java.io.IOException;
  5. import java.io.InputStreamReader;
  6. import java.io.UnsupportedEncodingException;


  7. public class Main {

  8.         public static void main(String[] args) throws IOException{
  9.                 InputStreamReader isr = new InputStreamReader(new FileInputStream("C:\\Users\\student\\Downloads\\2.csv"),"UTF-8");
  10.                 BufferedReader br = new BufferedReader(isr);
  11.                 while(br.ready())
  12.                 {
  13.                         System.out.println(br.readLine());
  14.                 }
  15.                 isr.close();
  16.         }
複製代碼

TOP

返回列表