Does each custom exception in Java require its own class..?
<p>I'm new to Java custom exceptions. I see many examples of how to create them, but there are two questions I cannot find answers to:</p>

<p>1) Can a custom exception be defined within the object class it's intended for, or must it be in its own class file?</p>

<p>2) Regardless of location, can multiple custom exceptions be defined within a single class file, or does every custom exception require its own class file?</p>

<p>Some code snippets would be greatly appreciated. </p>

<p>Thanks.</p>