Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

What is difference between throw and throws keyword in Java?

Category: Java

throws keyword is used with method signature to declare the exceptions that the method might throw whereas throw keyword is used to disrupt the flow of program and handing over the exception object to runtime to handle it.

Leave a Reply

Your email address will not be published. Required fields are marked *