Preview:
public class lab27
{
public static void main(String[] args)
{
try
{
int arr[]=new int[-6];
}
catch(NegativeArraySizeException e)
{
System.out.println("exception 1;"+e);
}
finally
{
System.out.println("the try catch is finished");
}
}
}
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