Java
  Home arrow Java arrow Page 5 - 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 
Actuate Whitepapers 
VeriSign Whitepapers 
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

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    The Genius of Java - Fully Integrated Exceptions


    (Page 5 of 9 )

    The conceptual framework for exceptions pre-dates Java. So, too, does the incorporation of exceptions into other programming languages. For instance, exceptions were added to C++ several years before Java was created. What makes Java’s approach to exceptions important is that they were part of the original design. They were not added after the fact. Exceptions are fully integrated into Java and form one of its foundational features.

    A key aspect of Java’s exception mechanism is that its use is not optional. In Java, handling errors through the use of exceptions is the rule. This differs from C++, for example, in which exceptions are supported but are not fully integrated into the entire programming environment.

    Consider the common situations of opening or reading from a file. In Java, when an error occurs during one of these operations, an exception is thrown. In C++, the methods that open or read from a file report an error by returning a special error code. Because C++ did not originally support exceptions, its library still relies on error return codes rather than exceptions, and your program must constantly check for possible errors manually. In Java, you simply wrap the file-handling code within a try/catch block. Any errors will automatically be caught.

    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 2 hosted by Hostway