String filename="C:\\Users\\Rajashekar\\Desktop\\fwfwd\\Software Failures1_Test.txt";//Input Files String data; public ArrayList<String> value=new ArrayList<String>(); public void read() throws IOException{ File f = new File(filename); FileReader fr = new FileReader(f); BufferedReader br = new BufferedReader(fr); String []s = new String[2]; while ((data=(br.readLine()))!=null) { s=data.split(" /n"); System.out.println(s[0]+" "+s[1]); value.add(s[0]); value.add(s[1]); } //System.out.println(data); br.close();