EXCEPTION HANDELING - Java Codes

Example of Exception

Description This code shows how an Exception is handled by try and catch block. Source Code package Error; import java.util.EmptyStackException; import java.util.Stack; public class Exception ...

0 Comments. 802 views since Sep 14, 2008

Exception Demo

Description Simple demo of exceptions, with finally clause. Source Code public class ExceptionDemo2 { public static void main(String[] argv) { new ExceptionDemo2().doTheWork(); } ...

0 Comments. 786 views since Sep 14, 2008

Unchecked Exception

Description What happens if a method declares an unchecked exception? Some people seem to think that declaring a method in a throws clause is what makes it "checked". As we see here, this is not the case; checked-ness has only to do with ...

0 Comments. 737 views since Sep 14, 2008

Experience Exception

Description This code dislays a window in which there is a list of various Exceptions and on selecting them(radiobuttons) exceptions will be thrown on console. Source Code import java.awt.Frame; impor ...

0 Comments. 703 views since Sep 14, 2008