| Author |
ExceptionTest
|
Venkat Ramsimha
Ranch Hand
Joined: Dec 28, 2004
Posts: 127
|
|
hi all, can anybody suggest and explain whts the output for the above program and how its generated? Thanks, venkat ( tags and formatted) [ May 12, 2005: Message edited by: Barry Gaunt ]
|
 |
Timmy Marks
Ranch Hand
Joined: Dec 01, 2003
Posts: 226
|
|
There will be no output from this program. There is no main method.
|
 |
Henry Wong
author
Sheriff
Joined: Sep 28, 2004
Posts: 16686
|
|
I don't think program will even compile. The runTest() method is declared to throw a checked exception, which can't happen. The test() method does handle the checked exception or is declared to throw it. Henry
|
Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
|
 |
Rohan Kayan
Ranch Hand
Joined: Sep 17, 2004
Posts: 123
|
|
|
There will be compilation error the method test should explicitly catch the exception or it should put them in throws caluse .
|
SCWCD 1.4, SCJP 1.4
|
 |
 |
|
|
subject: ExceptionTest
|
|
|