I have stumbled upon a weirdness regarding the behavior of readLine in Scala (at least with my current basic understanding of the language).
The following snippet is supposed to read three times a line from standard in. But it reads 3 times the…
Integer a = 100, b = 100;
Integer c = 200, d = 200;
System.out.println( (a == b) == (c == d) ); // A
Response: counter intuitively, the program prints ‘false’ out. Integer in Java is a non-native class, where ‘==’ means…