java - Can anyone please correct my given statement if its wrong(about throw/throws) -


throw:-we have handle exception(we in sense user here).

throws:we asking compiler handle exception raised.

please correct if stated above wrong . if wrong please tell me correct statement.

thanks in adv!

i'd both not exact.

throw statement causes throwing of exception. no-one has catch however. example runtime exception can thrown without requirement catch them in application code.

throws keyword allows declare method may throw exception of specific type.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -