next perfect squire java
public class nextperfectsquare {
public static void main(String[] args) {
int a=15;
int result=isPerfectSquare(a);
System.out.println(result);
}
static int isPerfectSquare(int num){
int square = 0; int i = 0; int result = 0;
for( i=0;i<num+1;i++){
System.out.println(i);
square=i*i;
if(square>=num){
result=square;
break;
}
}
return result;
}
}