Why Does Java Have Automatic Garbage Collection and Multi-Threading?
Ans : OK, so thats really two questions. One of the priorities in creating the Java language was to keep the language simple. Or more specifically, the goal was to avoid a lot of the complexities of C++. One of the common complaints about coding is the work you must do to manage your memory, not to mention the consequences if you dont do it properly. Studies have shown that up to 50% of a programmers time, when using non-garbage-collected languages such as C and C++, goes into managing memory storage. And, a significant amount of debugging time goes toward tracking down memory-related bugs. The beauty of the Java Virtual Machine is that it takes care of memory management for you. This process is called automatic garbage collection. A low-priority thread periodically scans your applets memory for unused objects and recycles the memory they were using. It does this by keeping track of what parts of your program are using memory, and determining when those chunks of memory are no longer n
Ans : OK, so that’s really two questions. One of the priorities in creating the Java language was to keep the language simple. Or more specifically, the goal was to avoid a lot of the complexities of C++. One of the common complaints about coding is the work you must do to manage your memory, not to mention the consequences if you don’t do it properly. Studies have shown that up to 50% of a programmer’s time, when using non-garbage-collected languages such as C and C++, goes into managing memory storage. And, a significant amount of debugging time goes toward tracking down memory-related bugs.The beauty of the Java Virtual Machine is that it takes care of memory management for you. This process is called automatic garbage collection. A low-priority thread periodically scans your applet’s memory for unused objects and recycles the memory they were using. It does this by keeping track of what parts of your program are using memory, and determining when those chunks of memory are no longe