I am trying to solve the collatz conjecture.
I am using HashMap
and Vector
classes. I have to iterate the loop 2 147 483 648 times, but after I store 8,438,409 values in HashMap
I'm getting an OutOfMemoryError
.
I'm running the program in Eclipse and have set -Xmx1024m option, but it didn't help. So, I'm catching the above error and trying to start a thread which would take the control to different class and start executing.
However, the thread is not starting. I've put System.out.println("We are here");
statement in it and it's never printed to the console. Can someone help me with this?
Thanks funny