what is the Use of throws exception?

Answer Posted / niranjanravi

it is used to throw the list of exceptions that a method
has to throw.
Syntax:
returntype methodname(list of args)throws
exception1,exception2{
body
}

Is This Answer Correct ?    15 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a java lambda expression?

547


What if constructor is protected in java?

556


How do you get length in java?

551


Describe what happens when an object is created in java ?

543


What are the 3 types of control structures?

522






Can we declare main () method as non static?

514


What is update method called?

655


How to create an interface?

623


Explain jdk, jre and jvm?

565


What is consumer in java?

520


What is the difference between declaration and definition in java?

515


What is the simpletimezone class in java programming?

532


Given a singly linked list, determine whether it contains a loop or not without using temporary space?

580


What is starvation?

677


Can we increase size of array?

562