I came accros one of the solutions for finding if a number is prime as below :

```
//checks whether an int is prime or not.
boolean isPrime(int n) {
if (n == 2){
return true;
}
//check if n is a multiple of 2
if (n%2==0){
return false;
}
//if not, then just check the odds
for(int i=3;i*i<=n;i+=2) {
if(n%i==0)
return false;
}
return true;
```

}

What I am trying to understand is this line of code:

```
for(int i=3;i*i<=n;i+=2)
```

how does

```
i*i<=n
```

help in determining that the number is prime ?

Thanks