Why is this ok? What exactly does it compare?

```
    int i = 10; 
    char c = 10;
    if( c == i)
       System.out.println("We are Equal");

```

And the same in this situation:

```
    String s1 = "Null"; 
    String s2 = new String(s1);
    if( s1 == s2)
       System.out.println("We are Equal");

```

I get that we're not comparing the contents of the variable.