difference throws and throw in java

Answer Posted / chaitanya

throws clause is used when the programmer does not want to
handle the exception and throw it out of a method.throw
class is used when the programmer wants to throw an
exception explicitly and wants to handle it using catch
block.hence ,throws and throw are contradictory.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we sort set in java?

543


What does the three dot emoji mean?

588


How strings are created in java?

572


Is nullpointerexception checked or unchecked?

559


What is assembly condition codes?

560






Is array passed by reference in java?

584


What is the static field modifier?

602


What is the purpose of the runtime class in java programming?

570


What are static variables and functions?

631


What is an array in java?

644


How to sort a collection of custom Objects in Java?

604


Difference between abstract and concrete class ?

583


Can java arraylist hold different types?

500


What is the diffrence between inner class and nested class?

567


What is string subsequence method?

635