Why is my code wrong ?? -> How to determine if an int is perfect square? : My code seems to pass many cases, but my codes seem to fail a particular private test case. Can anyone help me ?

	static boolean isSquare(int n) {
		IntStream y=IntStream.range(1, n).map(((int x)->{return x*x;}));
		return y.anyMatch(x->(x==n));
	}