Question: how to find gcd of two numbers java?
Answer: Euclid's algorithm is an efficient way to find GCD of two numbers and it's pretty easy to implement using recursion in Java program. According to Euclid's method GCD of two numbers, a, b is equal to GCD(b, a mod b) and GCD(a, 0) = a.