7 years ago in Java Exception Handling

What will be the output of the program?

public class Foo
{
public static void main(String[] args)
{
try
{
return;
}
finally
{
System.out.println( "Finally" );
}
}
}

[A] Finally
[B] Compilation fails.
[C] The code runs with no output.
[D] An exception is thrown at runtime.
Loading...
Next Question

Create your Digital Resume For FREE on your name's sub domain "yourname.wcard.io". Register Here!


Overall Stats

Attempted 239
Correct 132
Incorrect 15
Viewed 92

Answers

Guest
Guest
Abduvokhid Abduvokhidov
Abduvokhid Abduvokhidov - 4 years ago

Abduvokhid Abduvokhidov from Uzbekistan is saying Compilation fails. is correct answer

priya narkhede
priya narkhede - 4 years ago

priya narkhede from Mumbai, India is saying Finally is correct answer

SASMITA SAHU
SASMITA SAHU - 4 years ago

SASMITA SAHU from Hyderabad, India is saying Finally is correct answer

Mario Raouf
Mario Raouf - 4 years ago

Mario Raouf from Cairo, Egypt is saying Finally is correct answer

Radwa Maher
Radwa Maher - 4 years ago

Radwa Maher from Romania is saying An exception is thrown at runtime. is correct answer

Related Questions

what is checked exception

  • [A] Error
  • [B] Runtime Erroe
  • [C] SQL Exception

sub class of writer class is?

  • [A] byte writer
  • [B] character writer