I am wondering if this question can be solved in Java (I\'m new to the language). This is the code:
class Condition {
// you can change in the main
p
There are so many solutions:
class A extends PrintStream {
public A(PrintStream x) {super(x);}
public void println(String x) {super.println("Not ok");}
public static void main(String[] args) {
System.setOut(new A(System.out));
int x = 0;
if (x == x) {
System.out.println("Ok");
} else {
System.out.println("Not ok");
}
}
}