Here you can find the source of gcd(int largerNumber, int smallerNumber)
public static int gcd(int largerNumber, int smallerNumber)
//package com.java2s; //License from project: Open Source License public class Main { public static int gcd(int largerNumber, int smallerNumber) { return (smallerNumber == 0) ? largerNumber : gcd(smallerNumber, largerNumber % smallerNumber); }//from w ww . ja v a 2s .c o m }