Skip to content
Advertisement

Tag: new-operator

(Java)Using while function with condition

I am making program that add all the number from user input until 0 comes. when 0 comes as input, I want to show all the numbers that are saved. When I run the program I got the “java.lang.OutOfMemoryError: Java heap space” this error and I want to know what part is wrong. Answer IMHO a for loop is more

Advertisement