What is the difference between throw and throws?

Answer Posted / rajanani

'throw' is declare the exception and throws is defined the
exception

Is This Answer Correct ?    3 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?

611


How do you sort data in java?

525


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

570


how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread

536


How use .contains in java?

624






What is keyword auto for?

643


What is the difference between jdk and jre?

612


Which methods are used during serialization and deserialization process?

553


Is 0 a real number?

590


Why is stringbuffer thread safe?

568


What will happen if static modifier is removed from the signature of the main method?

529


Do you know why doesn't the java library use a randomized version of quicksort?

555


How do you convert string to int in java?

564


Why object class is super class for every class in java?

578


How to perform selection sort in java?

587