Hello jvasilj1

Use this class. It will solve your problem.

import java.util.*;
public class AmicablePairs{
protected static Vector<Integer> getFactors(int number){
Vector<Integer> result...