J-M-L:
Test if the file was opened properly (and don’t forget to close it)
Does the program crash or just continues happily ?
Do you actually have something in the file?Give us a full code exhibiting the issue that compiles - your problem may be elsewhere like too many open file descriptors or no more memory for your String (how big is that file that you try to suck into your String object?)
It continuous happly