public static boolean squareNumber(int n){ int num = (int)Math.sqrt(n); Listlist = Aron.allPrimes(num); for (int i = 0; i < list.size(); i++) { Integer p = list.get(i); if (n % (p * p) == 0) n = n / (p * p); } if(n == 1) return true; else return false; }