Question: here is my code

```
ArrayList <String> arr = new ArrayList<String>();
        arr.add("123 456");
        String []arr2 = arr.get(0).split(" ");

        char[]x=arr2[0].toCharArray();
        char[]y=arr2[1].toCharArray();

        System.out.println(x[0]);
        System.out.println(y[0]);

        int z = x[0]+y[0];
        System.out.println(z);

```

i get a result of 1 6 but the z is 103 how is that possible when

```
    char xx=1;
        char yy=6;

        int zz = xx+yy;
        System.out.println(zz);

```

results to 7

Answer: 
Why are you adding char primitives? 

If you're trying to concatenate, it works only within String objects, or between String and primitives. 

<https://docs.oracle.com/javase/tutorial/java/data/strings.html>

In case you're wondering why you get those results, char is sort of a compatible primitive with int, so they can be sum (they will return the sum of the ascii values corresponding to the characters).

<http://www.asciitable.com/>

Here you can check the values for your chars, but I don't think this is what you want to do.
As others in the comments have pointed out, in your second example you are adding

`int xx = 1`
and `int yy = 6` thus `xx + yy` returns `7`.

However, in your first example, you are adding `cx = '1'`
and `cy = '6'` so `int value = cx + cy` evaluates to `48 + 54`