“Memory limit exceeded” and “Compilation error” in Code Playground
What causes a program to return these messages? I’ve never seen these while trying to run programs through Netbeans or via command line, so I’m assuming these are specific to the Code Playground. I suspected that “Memory limit exceeded” might have been caused by a mistake in implementing a recursive method (i.e., maybe the message masked a StackOverflowError), but a test program I made to intentionally trigger that returned a StackOverflowError with stacktrace and “Time limit exceeded” instead. So I still have no idea what the underlying problem is. “Compilation error” is even more confusing, because I came across it when trying to run a program which had previously compiled correctly and had not been modified. It worked when I ran it again, so it seems like whatever problem there is is actually happening at runtime (and is probably somehow tied to output from the RNG). If it’s relevant, I’m using the iOS app and coding in Java.