Preview:
public class lab26
{
public static void main(String[] args)
{
try
{
int x=67/0;
}
catch(ArithmeticException e1)
{
System.out.println("exception 1;"+e1);
}
try
{
String s=null;
System.out.println(s.length());
}
catch(NullPointerException e2)
{
System.out.println("exception 2:"+e2);
}
}
}



downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter