java - Propagating Exception to called method using throws -
stack trace follows:
c b main
assume c
throwing filenotfoundexception
. propagated exception b
using throws
. , propagating exceptions b
a
, a
main
.
when use throws filenotfoundexception
in main, exception propagated?
because didn't define catch
inside main filenotfoundexception
, throws
.
to java runtime, print stack trace , abort program.
(i'm curious led question. did try code? confused behavior?)
Comments
Post a Comment