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
In this question @aioobe suggests (and advise against) the use of C preprocessor for Java classes.
Although it is extremely cheaty, that's my solution:
#define a evil++
public class Main {
public static void main(String[] args) {
int evil = 1;
if (a==1 && a==2 && a==3)
System.out.println("Success");
}
}
If executed using the following commands it will output exactly one Success
:
cpp -P src/Main.java Main.java && javac Main.java && java Main