Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

exam lab practice exam -1, question24 need justification?

 
Arjun Srivastava
Ranch Hand
Posts: 432
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

answer is it prints nothing and program never terminates, yes that is true,it shows.
in this question 24 of practice exam 1
as sleep method throws interrupted exception it must have to be used inside a try and catch clause.
but here it is nothing like that line 43.
???
 
Ankit Garg
Sheriff
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since the main method throws Exception, so the code in it can throw any checked exceptions that are sub-classes of java.lang.Exception class...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic