What is the difference between Error and Exception?

Asked

Viewed 1,103 times

1

Why we have Exceptions (IOException, for example) and Errors (OutOfMemoryError, for example)?

I know you both inherit from the class Throwable, but what’s the difference between them?

  • 1

    http://stackoverflow.com/a/912352/5524514

  • 1

    Answer from Vinny Godoy =: http://www.guj.com.br/t/qual-verdadeira-diferenca-de-error-e-exception/74549/8

  • @diegofm thanks. I will reply here based on that reply

1 answer

2


Based in that SO gringo response:

Errorare very big problems that should not be dealt with or launched.

They are problems that when they happen, there is not much to do.

Already Exceptions can be handled and launched. They can pose major problems, but nothing compared to such problems Error.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.