79104927

Date: 2024-10-19 12:32:07
Score: 1
Natty:
Report link

The mistake is that I am not flushing the data from the stream to the file everytime I decide to write a number. So every time the data is in the stream and not getting written to the file as a result the Buffered reader is reading null everytime. I have to just add:

if(!doesExist(mobileNo)){
   writer.println(mobileNo);
   writer.flush()
}
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Suraj Kumar Sahani