what difference between throw and throws in exception
handling.

Answer Posted / archana

throws is to handle exception by the system itself
whereas throw used by the user to handled the exception

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of exception handling?

803


What is generic class?

849


Give few examples of final classes defined in Java API?

915


What is null data type?

724


Can we use synchronized block for primitives?

829


What is data type in java?

698


Can we extend private class in java?

776


Why java doesn’t support multiple inheritances?

789


Is 0 true or false in java?

764


Can a static class have a constructor java?

743


do I need to use synchronized on setvalue(int)? : Java thread

765


In java, how we can disallow serialization of variables?

746


What are synchronized blocks in java?

802


How many types of the indexof method are there for strings?

730


What does the three dot emoji mean?

826