NotAvailable is an Exception but is not named appropriately
70 this.gender2=gender2;
71 }
72}
73class NotAvailable extends Exception 74{ 75 @Override 76 public String toString() 77 { 78 return "Not Available !"; 79 } 80} 81
82class holder implements Serializable
83{
Description
This class is an exception, but its name does not end in Exception
. This could be confusing to consumers of your API.
Bad Practice
class BadName extends Exception {
// ...
}
Recommended
class ActuallyAnException extends Exception {
// ...
}