Expect the OUTPUT!

import java.io.*; public class Exceptions { public static void main(String[] args) { try { int n = Integer.parseInt(args[0]); } catch(NumberFormatException e) { System.out.println("Exception raised"); } catch(Exception f) { System.out.println("Number format exception raised"); } } }

IF THE INPUT GIVEN IS -1, WHAT IS THE EXPECTED OUTPUT...?

None Nothing is printed Number format exception raised Exception Raised

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

0 solutions

No explanations have been posted yet. Check back later!

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...