Here you can find the source of divisor(int m, int n)
public static int divisor(int m, int n)
//package com.java2s; //License from project: LGPL public class Main { public static int divisor(int m, int n) { if (m % n == 0) { return n; } else {/*from w w w.j ava2 s. co m*/ return divisor(n, m % n); } } }