I am writing a web service in Java, and I am trying to figure out the best way to define error codes and their associated error strings. I need to have a nu
Using interface as message constant is generally a bad idea. It will leak into client program permanently as part of exported API. Who knows, that later client programmers might parse that error messages(public) as part of their program.
You will be locked forever to support this, as changes in string format will/may break client program.