Question

9. What output is produced by the following code? (2 points) int waitTime 24 try SttrT block entered y if (waitTime> 25) thro

0 0
Add a comment Improve this question Transcribed image text
Answer #1


HelloWorld.java (/Desktop) -gedit File Edit View Search Tools Documents Help HelloWorld.java x public class Helloworldt publinagesh@nagesh-TravelMate-4740: /Desktop File Edit View Search Terminal Help nagesh@nagesh-TravelMate-4740:-$ cd D* nagesh@nag

OUTPUT:

try block entered

Leaving try block

Explanation:

we intiated Wait Time to 24.

In try block first we are printing "try block entered"

if IF condition fails then "Time limit Exceeded" will be printed

But the if condition is (Wait Time >25) so it failed and "Leaving try block" is printed.

there is no error occuerd so the catch block will not executed.

PLEASE GIVE YOUR POSITIVE FEEDBACK.

Add a comment
Know the answer?
Add Answer to:
9. What output is produced by the following code? (2 points) int waitTime 24 try SttrT...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT