BufferedReader br = new BufferedReader(new FileReader(fileLocation));
String contentLine = br.readLine();
while(contentLine!= null){
System.out.println(contentLine);
contentLine = br.readLine();
}
return contentLine; // returns null
}
Hello All, I am in process of learning java, and here i am trying to parse a file that prints out the json message, the challenge I am facing is, I need to return that json which is inside while loop. Currently, the method returns null
contentLine = br.readLine();tocontentLine += br.readLine();