Don’t try this at home !!

Luca | October 16, 2007

If you write something along the line of that:

public enum MyError {
ERROR1, ERROR2, ERROR3;
public static String explain(MyError code) {
switch (code) {
case ERROR1:
return "message for the error 1";
case ERROR2:
return "message for error 2";
default:
return "generic error"; }
}
}
You seriously don’t have a clue of what Object Oriented is.

p.s. yes, this is real code I’ve recently seen (thanks God not from any colleagues…)