问题
This is a theoretical question .
Can a flood of system out on java applet , cause applet to go out of memory ?
If yes what would be an easy solution to remove multiple sysout spanning across multiple files ?
回答1:
A single System.out.println(x) can cause an out of memory error, if x.toString() uses too much memory.
Can a flood of system out on java applet , cause applet to go out of memory ?
It is size of the resulting String which matters, not the number. More messages will be slower, but make no difference to the amount of free memory after a Full GC and that is what counts.
来源:https://stackoverflow.com/questions/24449996/java-can-system-out-result-in-out-of-memory-issues