code: public void exit(Object monitor) {
          if (monitor == null) {
              throw new NullPointerException();
          }
  
          // remove last
          ListIterator it = monitors.listIterator(monitors.size());
          while (it.hasPrevious()) {
              Object prev = it.previous();
              if (monitor == prev) { // Never use equals() to test equality. We always need to make sure that the objects are the same, we
                                     // don't care if they're the objects are logically equivalent
                  it.remove();
                  return;
              }
          }
          
          throw new IllegalArgumentException(); // not found
      }
docs: Do not use -- for internal use only.
  <p>
  Should be called after a MONITOREXIT instruction has been executed. Untracks the object that MONITOREXIT was used on.
  @param monitor object the MONITOREXIT instruction was used on