# Java exceptions explained

**URL:** <https://boards.straightdope.com/t/java-exceptions-explained/487100>\
**Category:** Miscellaneous and Personal Stuff I Must Share\
**Created:** [February 23, 2009, 8:31pm UTC](https://boards.straightdope.com/t/java-exceptions-explained/487100 "2009-02-23T20:31:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [February 23, 2009, 8:31pm UTC](https://boards.straightdope.com/t/java-exceptions-explained/487100/1 "2009-02-23T20:31:10Z")

</div>

[“ **ClassCastException** : You need to stay in the class or caste you were born into. Java will not accept dailits acting as kshatriyas or noblemen pretending to be working class. Note the spelling mistake (of caste) that was introduced in Java 1.0 and has not been corrected for backwards compatability reasons.”](http://rymden.nu/exceptions.html)

“ **CloneNotSupportedException** : You are a clone. Find the original you, tell him what you want to do and then kill yourself.”

Now, why aren’t these things in textbooks?

---

<div class="post-metadata">

**Author:** ![Sefton](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@Sefton](https://boards.straightdope.com/u/Sefton)\
**Post date:** [February 23, 2009, 11:42pm UTC](https://boards.straightdope.com/t/java-exceptions-explained/487100/2 "2009-02-23T23:42:14Z")

</div>

Now that’s just plain silly!

I love the IndexOutOfBoundsException

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [February 24, 2009, 3:40am UTC](https://boards.straightdope.com/t/java-exceptions-explained/487100/3 "2009-02-24T03:40:03Z")

</div>

> [@](#):
>
> **NoSuchAlgorithmException:** You are trying to solve a problem in a previously unknown way. Stop being so damn creative and rewrite your program using old algorithms. You can also patent your idea and wait for it to be incorporated into a future Java release.

That’s why Knuth has such problems with Java.

> [@](#):
>
> **URISyntaxException:** The sentence “You are I” is not syntactically correct. Change it to “You are me”. What ever the hell that means.

IAmYouAndYouAreMeAndWeAreAllTogetherException will be added to the next release.

> [@](#):
>
> **BindException:** Java programming and bondage don’t mix.

Ha! And “Ha!” again.

> [@](#):
>
> **ObjectStreamException:** You have issued a stream of objections. Please limit yourself to one at a time and wait for the judge to make a ruling before issuing a new one. See **InvalidObjectException**.

This is when you need a language lawyer.

---

<div class="post-metadata">

**Author:** ![Civil\_Guy](https://avatars.discourse-cdn.com/v4/letter/c/d78d45/32.png) [@Civil\_Guy](https://boards.straightdope.com/u/Civil_Guy)\
**Post date:** [February 24, 2009, 5:32am UTC](https://boards.straightdope.com/t/java-exceptions-explained/487100/4 "2009-02-24T05:32:35Z")

</div>

**NullPointerException** : Ya’ tried to make the coder stuffy do sumthin’ here when thar weren’t no here thar. But we dassn’t tell ya 'zactly where here wasn’t - find it yourself, dagnabbit!

---

<div class="post-metadata">

**Author:** ![brujaja](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@brujaja](https://boards.straightdope.com/u/brujaja)\
**Post date:** [February 24, 2009, 9:24am UTC](https://boards.straightdope.com/t/java-exceptions-explained/487100/5 "2009-02-24T09:24:39Z")

</div>

ROTFLMAO. Thanks, **Derleth!**
