EmptyCollectionException.java 296 B

123456789
  1. /**
  2. * emptyCollectionException
  3. * Provides a nice message when we try to remove from an empty heap.
  4. */
  5. public class EmptyCollectionException extends RuntimeException {
  6. public EmptyCollectionException() {
  7. System.err.println("Operation not allowed; the collection is empty.");
  8. }
  9. }