One Line - Extremely Easy - Java Solution


#1
public class Solution 
{
    public int gcd(int A, int B) 
    {
        return (A == 0)? B : gcd(B%A, A);
    }
}

If someone is thinking about it, FYI if you observe carefully, it works even when A > B as it automatically reverses in the return statement.
Dry run to see for yourself.