String fname = "in.csv"; try { BufferedReader br = new BufferedReader(new FileReader(fname)); String iline = null; while ((iline = br.readLine()) != null) { String[] str =iline.split(","); System.out.println(str[0]+":"+"\tデータ1="+str[1]+ "\tデータ2="+str[2]); } br.close(); } catch (FileNotFoundException fe) { System.out.println(fname +"というファイルが開けません"); } catch (IOException err) { System.out.println("IOExceptionをキャッチ"+err); }