example how to try ,catch , finally
package exceptions;
public class Trycatchfinally {
public static void main(String arg[])
{
try
{
System.out.println("fsdf");
}
catch(ArithmeticException e)
{
System.out.println("catch");
}
finally
{
System.out.println("finally");
}
}
}
output:
try
finally
0 comments:
Post a Comment