Exception handling across multiple classes

Is it possible to throw the exception from one class to another class for exception handling.............. can anyone tell me the way........
[148 byte] By [83Krisha] at [2007-11-27 2:55:55]
# 1
yes. you declare that your method throws the exception in question, and then it no longer has to deal with that exception itself. methods which call that method do so instead, and they, too, are free to throw it back to their calling methods, if they wish
georgemca at 2007-7-12 3:33:09 > top of Java-index,Java Essentials,Java Programming...
# 2
k... here iam using thread..... i dont knw how to throw the exception to the thread class........ do u knw how to do that....
83Krisha at 2007-7-12 3:33:09 > top of Java-index,Java Essentials,Java Programming...
# 3

you don't throw it to a specific class. in the method where the exception might be thrown, you can choose to either catch it there, or just re-throw it so that the method before it can choose to catch it or throw it. you know what a stack trace is? it's a chain of methods that were called to get to a certain point in execution, and if an exception is thrown somewhere, either the method in which it is thrown deals with it, or it passes it back to the preceeding method in the stack

why were you trying to throw it to a class?

georgemca at 2007-7-12 3:33:09 > top of Java-index,Java Essentials,Java Programming...
# 4

Iam developed multithreaded socket... for each socket connection iam creating a execution thread and corresponding n number of servant thread.... if in case my execution thread died means i need to stop my servant thread.,thats why by throwing exception to servant thread class .. i need to knw how to do that....?if in case any of my servant thread died means i need to invoke the new child thread.....

83Krisha at 2007-7-12 3:33:09 > top of Java-index,Java Essentials,Java Programming...