Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 
 public class AFBR_Sample
 {
 	public int test1(boolean b)
 	{
		try
		{
			int i = 0;
		}
		finally
		{
			if (b)
				return 0;
			int j = 0;
		}
		return 2;
	}
	public int test2()
	{
		try
		{
			return 0;
		}
		finally
		{
			throw new NullPointerException();
		}
	}
	public int test3() throws Exception
	{
		try
		{
			return 0;
		}
		finally
		{
			throw new Exception();
		}
	}
	public int test4()
	{
		try
		{
			throw new Exception();
		}
		catch (Exception e)
		{
			return 1;
		}
		finally 
		{
			return 0;
		}
	}
	public int test5() throws IOException
	{
		InputStream is = null;
		try
		{
			is = new FileInputStream("test");
			return 1;
		}
		catch (IOException ioe
		{
			..println("error");
		}
		finally
		{
			if (is != null)
				is.close();
		}
		return 0;
	}
New to GrepCode? Check out our FAQ X