what is the output ? how is the parameter that generates an exception being passed as an argument in a method ???
Question ID :957921513300
What will be the output of the following program ?
class
Test {
static int i1, i2, i3;
public static void main(
String[] args)
{
try
{
test(i1 = 1, oops(i2=2), i3 = 3);
} catch (Exception e)
{
System.out.println(i1+" "+i2+" "+i3);
}
}
static int oops(int i) throws Exception
{
throw new Exception("oops");
}
static int test(int a, int b, int c) { return a + b + c; }
}