I have used BufferedReader
to read the content from the file but now I want to store the content of the file into an array list where my file contains some text from the pdf so now I wanted to add all those content to the array list
Here I have created array list but now I don't know how to proceed how to go next and then read from while loop so please help me
ArrayList<String>YourList=new ArrayList<String>();
FileReader fr = new
FileReader("D:\\PDFTOEXCEL\\Extractionfrompdf.txt");
BufferedReader br = new BufferedReader(fr);
String s;
String keyword = arra.get(6);
while ((s = br.readLine()) != null) {
if (s.contains(keyword)) {
s = s.replaceAll(keyword, " ");
System.out.println(s);
}
}