code: public static long divideUnsigned(long dividend, long divisor) {
          if (divisor < 0L) { // signed comparison
              // Answer must be 0 or 1 depending on relative magnitude
              // of dividend and divisor.
              return (compareUnsigned(dividend, divisor)) < 0 ? 0L :1L;
          }
  
          if (dividend > 0) //  Both inputs non-negative
              return dividend/divisor;
          else {
              /*
               * For simple code, leveraging BigInteger.  Longer and faster
               * code written directly in terms of operations on longs is
               * possible; see "Hacker's Delight" for divide and remainder
               * algorithms.
               */
              return toUnsignedBigInteger(dividend).
                  divide(toUnsignedBigInteger(divisor)).longValue();
          }
      }
docs: Returns the unsigned quotient of dividing the first argument by
  the second where each argument and the result is interpreted as
  an unsigned value.
  
  <p>Note that in two's complement arithmetic, the three other
  basic arithmetic operations of add, subtract, and multiply are
  bit-wise identical if the two operands are regarded as both
  being signed or both being unsigned.  Therefore separate {@code
  addUnsigned}, etc. methods are not provided.
  
  @param dividend the value to be divided
  @param divisor the value doing the dividing
  @return the unsigned quotient of the first argument divided by
  the second argument
  @see #remainderUnsigned
  @since 1.8