You're using peek()
which doesn't actually remove the next character from the input, so it loops on and on. You need nextInt()
;
↧
Answer by Kevin Rubin for Why do I get a java.lang.OutOfMemoryError: Java heap space error?
↧
Trending Articles
More Pages to Explore .....