Confusion in exception

I read somewhere that error and exception are two different things. Then, somewhere else it was written that errors are of many types and runtime errors are called exceptions.

Then, in the java tutorial i found out that there are three types of exceptions and error is one of them....

Now i am totally confused....

Can anybody pls tell me whether exception is a runtime error or does error fall under the category of exception?

[452 byte] By [akankshaa] at [2007-11-27 4:30:45]
# 1
The javadoc explains it. http://java.sun.com/javase/6/docs/api/java/lang/Throwable.htmlTake a look at the line that says direct known subclasses. Kaj
kajbja at 2007-7-12 9:40:06 > top of Java-index,Java Essentials,New To Java...
# 2
thanks
akankshaa at 2007-7-12 9:40:06 > top of Java-index,Java Essentials,New To Java...
# 3

Class Error and class Exception are derived from lang.Throwable.

but these are different things.

Error class Concentrate about Runtime Exception.

it means lake of memorry, some thing like that it is depend on the system we can't do any thing.

checked exception means when the program met some unexpect Situation it will arise. when you try to convert strings to integer it can't be convert to integer. that time you will get numberformatexception.

if you get a chance to see any scjp guide books you can get more details about it.

jeyrama at 2007-7-12 9:40:06 > top of Java-index,Java Essentials,New To Java...