Question: Currently developing an app including `google maps`, I'm willing to make it work for China as well.

I know the situation in China evolved a bit during the last years. So I would like to know: is it possible to use google maps for an android app in China?

If I attempt to use it as it is directly, the map remains blank, taking probably too long to load or being blocked by the chinese firewall. And my phone has the google services, which is not the case of many other phones.

However, a version of google maps exists in China. See this link: <http://www.google.cn/maps?hl=en>

So as a part of google is not blocked, would it be possible to load the data of the google maps API for android from the chinese server when the user himself is in China or doesn't have the google services or a VPN?

Answer: 
***[update]*** Using `new Integer(int)` is guaranteed to always result in a new object whereas `Integer.valueOf(int)` allows caching of values to be done by the compiler, class library, or JVM.

To explain I have written below code and used `javap` tool, command to generate below code I used `javap -c <Classname>` which gives you byte code.

```
    Integer x = new Integer(0), y;
    y=x;
    x+=0;
    System.out.println(x==y); // prints false

```

[![enter image description here](https://i.stack.imgur.com/mSczO.png)](https://i.stack.imgur.com/mSczO.png)

If you will see in the above code it creates new object with dynamic memory allocator which is `new`. Now in second case as below:

```
    Integer x = 0, y;
    y=x;
    x+=0;
    System.out.println(x==y); // prints true

```

[![enter image description here](https://i.stack.imgur.com/whSiG.png)](https://i.stack.imgur.com/whSiG.png)

As said by Peter it uses `valueOf` method which means it is comparing same object at run time so it will return `true` with object comparison operator (`==`). But in first case it was creating new object which is conspicuous in below debugging snapshot:

[![enter image description here](https://i.stack.imgur.com/mEqVe.png)](https://i.stack.imgur.com/mEqVe.png)

I hope this helps. :)

By the way Kevin Esche answer also adds to the question. Because it is basically referencing to cached object, try to relate it in case of `String`. If you are using `new String("some_string")` it will create new object else if available it will use from `string pool`. And remember you are using wrapper classes not primitive.
Because,

Integer x is an object.
So == , compares reference and not value.

int x is not an object
So == , compares value

Your simple code:

```
Integer x = new Integer(0), y;
y=x;
x+=0;
System.out.println(x==y); // prints false
System.out.println(x.equals(y)); // prints true

int x1, y1;
x1 = 5;
y1 = x1;

System.out.println(x1==y1); // prints true
System.out.println(((Integer) x1).equals(y1)); //prints true

```

And results:

* false
* true
* true
* true

best regards

OK - I have seen the response with javap (thanks for that answer) and I understand what I miss. However, I find the piece of code that I propose remains interesting.