Saturday, May 17, 2008

Java Is Important To the Internet

The Internet helped catapult Java to the forefront of programming and Java in turn has a profound effect on the Internet. The reason is simple: Java expands the universe of objects that can move about freely in cyberspace. In a network, there are two broad categories of objects transmitted between the server and your personal Computer. Passive information and dynamic, active programs. For example, when you read your e-mail, you are viewing passive data. Even when you download a program, the program’s code is still only passive data until you execute it

However, there is a second type of object that can be transmitted to your computer. A dynamic, self-executing program. Such a program would be an active agent on the client computer, yet the server would initiate it. As desirable as dynamic, networked programs are, they also present serious problems in the areas of security and portability. Prior to Java cyberspace was effectively closed to half the entities that now live there. Java addressed these concerns and doing so, has opened the door to an exiting a new form of program.
Exception Handling:
An exception is an abnormal condition that arises in a code sequence at run time. In other words, an exception is a run-time error.

Exception-Handling Fundamentals:

A Java exception is an object that describes an exceptional (that is, error) condition that has occurred in a piece of code. When an exceptional condition arises, an object representing that exception is created and thrown in the method that caused the error.exceptions can be generated by the Java run-time system, or they can be manually generated by your code. Exceptions thrown by Java relate to fundamental errors that violate the rules of the Java language or the constraints of the Java execution environment. Manually generated exceptions are typically used to report some error condition to the caller of a method.