What is the difference between throw and throws?

Answer Posted / neeraj kumar singh

When we wants to throw an exception explicitly in the program use the throw keyword.Whether a throws keyword is used when a system throws an exception itself.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is string builder not thread safe?

814


What is remote method invocation (rmi)?

795


How does map works in java?

724


What does java ide mean?

824


Explain the importance of finally block in java?

723


Which collection does not allow duplicates in java?

690


Whats the difference between notify() and notifyall()?

771


Can you sort a string in java?

667


Can private class be inherited in java?

782


What does serializing data mean?

708


What is a double?

803


What is a finally block?

748


Who found java?

756


List some important characteristics on jre

788


What is sizeof () operator?

728