Java
  Home arrow Java arrow Page 3 - The Genius of Java
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Moblin 
JMSL Numerical Library 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVA

The Genius of Java
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 67
    2004-05-05

    Table of Contents:
  • The Genius of Java
  • Simple Types and Objects - The Right Balance
  • Memory Management Through Garbage Collection
  • A Wonderfully Simple Multithreading Model
  • Fully Integrated Exceptions
  • Streamlined Support for Polymorphism
  • Portability and Security Through Bytecode
  • The Richness of the Java API
  • The Applet, and The Continuing Revolution

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    The Genius of Java - Memory Management Through Garbage Collection


    (Page 3 of 9 )

    Garbage collection as a memory management technique has been around a long time, but in Java it took on a new life. In languages such as C++, memory must be managed manually, with the programmer explicitly releasing unused objects. This is a source of problems because it is common to forget to release a resource after it is no longer needed, or to release a resource that is still being used. Java prevents these problems by managing memory for you. This can be done in an efficient manner because all objects in Java are accessed through a reference. Thus, when the garbage collector finds an object to which there is no reference, it knows that the object is unused and can be recycled. Had Java allowed objects to be operated on directly (in a fashion similar to the simple types), then such an efficient means of garbage collection would not have been possible.

    Java’s use of garbage collection reflects the philosophy of Java in general. The Java designers took great pains to create a language that would prevent some of the problems typical of other programming languages. By using garbage collection, it is not possible for the programmer to forget to release a resource or to mistakenly release a resource that is still in use. Thus, garbage collection heads off an entire class of problems.

    Remember: this is chapter one of The Art of Java, by Herbert Schildt and James Holmes (McGraw-Hill/Osborne, ISBN 0-07-222971-3, 2003). Check it out at your favorite bookstore today.  
    Buy this book now.

    More Java Articles
    More By McGraw-Hill/Osborne


     

       

    JAVA ARTICLES

    - Adding Images With iTextSharp
    - Adding Columns With iTextSharp
    - Creating Simple PDF Files With iTextSharp
    - The Spring Framework: Understanding IoC
    - Introducing the Spring Framework
    - Java Classes
    - Completing the Syntactic Comparison of Java ...
    - Syntactic Comparison of Java and C/C++
    - Java Statements
    - Conditionals, Expressions and Other Java Ope...
    - Java Operators
    - Primitive Data Types and Basic Language Rule...
    - Java and Object-Oriented Programming
    - Java Beginning Programming
    - Gaming Development Setup





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway