Q:

What is the result?

0

What is the result?

public class foo
{
public static void main (string[]args)
{
try
{
return;
}
finally
{
system.out.printIn("Finally");
}
}
}

  1. The program runs and prints nothing.
  2. The program runs and prints \"Finally\"
  3. The code compiles, but an exception is thrown at runtime.
  4. The code will not compile because the catch block is missing.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Correct Answer:
The program runs and prints "Finally"

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now