Java Question i was given the following code fragments, and i am suppose to display the execution results.?

emptiness caller()
Technique.out.println(“1 inch snow.”);
try out
Technique.out.println(“2 inch snow.”);
someMethod(“3 inch snow”);
Technique.out.println(“4 inch snow.”);
catch (SomeException except)
Technique.out.println(“5 inch snow.”);

Technique.out.println(“let them snow.”);

emptiness someMethod(String snow) throws SomeException
Technique.out.println(“10 inch snow.”);
in case (! environments.equals(“10 inch snow.”))
dispose of new SomeException(“nothing”);
Technique.out.println(“one foot or so snow”);

Assume caller() will be invoked.Please jot down the delivery results.

this may be the answer
1 inch snow
2 inch snow
10 inch snow
FIVE inch snow
let the brisket snow

I could possibly be daft, but I do not think either from the two previously mentioned are right.

1 inch snow.
2 inch snow.
10 inch snow.
1 foot snow
FIVE inch snow.
let the brisket snow.

That’s what I bought.

1 inch snow.
2 inch snow.
10 inch snow.
dispose of exception (“nothing”)
1 foot snow
FIVE inch snow
FIVE inch snow
let the brisket snow

1 inch snow
2 inch snow
10 inch snow
FIVE inch snow
let the brisket snow

it will be better should you did the homework yourself then you might understand the subject better.

Leave a Reply