Java in a Nutshell, 5th Edition [Electronic resources]

نسخه متنی -صفحه : 1191/ 281
نمايش فراداده

UnsupportedOperationExceptionjava.lang

Java 1.2serializable unchecked

Signals that a method you have called is not supported, and its implementation does not do anything (except throw this exception). This exception is used most often by the Java collection framework of java.util. Immutable or unmodifiable collections throw this exception when a modification method, such as add( ) or delete( ), is called.

Figure 10-71. java.lang.UnsupportedOperationException

public class

UnsupportedOperationException extends RuntimeException { // Public Constructors public

UnsupportedOperationException ( );

5.0 public

UnsupportedOperationException (Throwable

cause ); public

UnsupportedOperationException (String

message );

5.0 public

UnsupportedOperationException (String

message , Throwable

cause ); }

Subclasses

java.nio.ReadOnlyBufferException