code: public static int lcm(int a, int b) throws ArithmeticException {
          if (a == 0 || b == 0) {
              return 0;
          }
          a = Math.abs(a) / gcd(a, b);
          b = Math.abs(b);
          if (a > Integer.MAX_VALUE / b) {
              throw new ArithmeticException("Integer overflow");
          }
          return a * b;
      }
docs: Computes the least common multiple (LCM) of two integers.
  <p>
  Least common multiple is the smallest positive integer that can be divided by both numbers without a remainder.
  </p>
  
  @param a
  the first integer.
  @param b
  the second integer.
  
  @return The least common multiple of {@code a} and {@code b}, or null,
  if either {@code a} or {@code b} is null.
  
  @throws ArithmeticException
  when the result is too big to fit into an {@code int}.