2
2
.
.
1
1
.
.
3
3
E
E
x
x
c
c
e
e
p
p
t
t
i
i
o
o
n
n
s
s
I
I
n
n
f
f
o
o
This tutor
ial shows
basic except
ion
handling
in Java
.
Test.java
public
class
MyClass
{
publi
c
stat
ic
void
ma
in(Str
ing[]
args)
{
try
{
Inte
ger i
=
nu
ll
;
i.
byteVal
ue();
//
Throws
Exceptio
n.
}
cat
ch
(
Except
ion e)
{
Syst
em.out
.printl
n(e.to
String
());
}
}
}