Why are JAVA objects stored in Heap
JAVA objects and their instances are stored in Heap but Heap stores Dynamic Memory. I do get the concept about the Primitive Variables, in java, stored in Stack.
Primitives don't need much memory so it's ok to store in the stack. And some of them use the constant pool, what saves memory. Objects stored the heap because they handled dynamic, the memory is allocated in the heap in run time. If an object not used anymore the garbage collector delete it to free memory. A good article: http://www.journaldev.com/4098/java-heap-space-vs-stack-memory
Python — File Handling
Loop question, I've tried everything that I knew I just don't know. Please help me solve it out
Help me solve this (using loop)
What is wrong? Error on test.
Help me wiht python