If you ever were working on a Java application that had anything to do with the web you are probably familiar with java.net.URL class. I have a puzzle for you then: let’s say in your application you refer to JavaBlogging site with two URL using slightly different host name. Will those URL objects be equal [...]
Autoboxing pitfalls when comparing numbers with “==”
Here is a question for you. What happens when we compile and run the following code:
public class IntegerBig {
public static void main(String[] args) {
Integer a = 1000;
Integer b = 1000;
[...]