Java equivalent to .Net's NotSupportedException

Viewed 19439

Is there (not NotImplementedException, not supported).

2 Answers

java.lang.UnsupportedOperationException

Or, if you use Apache Commons Lang and the operation should be supported, but has not been implemented (yet?):

org.apache.commons.lang.NotImplementedException

You can use either UnsupportedOperationException or NoSuchMethodException or extend the Exception class and create your own custom exception called NotImplementedException or whatever

Related