public static boolean checkSquare(int i){
return IntStream
.rangeClosed(1, i/2)
.anyMatch(x -> Math.sqrt(x) == i);
}
When I enter 1 as an user input, it return false. I don't understand why square root of 1 is not equals to 1. Can anyone tell me is my code correct?