logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • How does a try statement determine which catch clause should be used to handle an exception?


  • Correct Answer
  • When an exception is thrown , the catch block of the try statement are examined in the order in which they appear The first catch block that is capable of handling the exception is executed The remaining catch blocks are ignored 


  • Technology problems


    Search Results


    • 1. What is static initializer block? What is its use?
    • Discuss
    • 2. What is the impact of declaring a method as final?
    • Discuss
    • 3. What is difference between Path and Classpath?
    • Discuss
    • 4. What are the restrictions when overriding a method ?
    • Discuss
    • 5. Can we compile a java program without main?
    • Discuss
    • 6. What are the the different ways for creating a thread?
    • Discuss
    • 7. What is the difference between creating a thread by extending Thread class and by implementing Runnable interface? Which one should prefer?
    • Discuss
    • 8. What is Thread ?
    • Discuss
    • 9. What do you understand by private, protected and public?
    • Discuss
    • 10. If a method is declared as protected, where may the method be accessed?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment