Add implementation of euclidean algorithm. (Java)