We know it can in JavaScript.
But is it possible to print \"Success\" message on the condition given below in Java?
if (a==1 && a==2 &&am
Along similar lines, by forcing a float (or double) to underflow (or overflow) through division (or multiplication) by a large number:
int a = 1;
if (a / Float.POSITIVE_INFINITY == 1 / Float.POSITIVE_INFINITY
&& a / Float.POSITIVE_INFINITY == 2 / Float.POSITIVE_INFINITY
&& a / Float.POSITIVE_INFINITY == 3 / Float.POSITIVE_INFINITY) {
System.out.println("Success");
}