public static boolean isSquare(int n) {
if (n < 0) {
return false;
}
if (n == 0) {
return true;
}
for (int i = 0; i <= n; i++) {
if (i * i == n) { //checks if no. is perfect square//
return true;
}
}
return false;
}
why isn't this code working for some numbers such as 219433929?