Question: As per the Java ternary operator `expression ? statement1 : statement2`,
if `expression` is true then `statement1` will be executed, if `expression` is false then `statement2` will be executed.

But when I run:

```
// some unnecessary codes not displaying
char y = 'y';
int i = 0;
System.out.print(false ? i : y);

```

I am expecting it to print `y` but its printing `121`, why?

**EDIT** 
As per the manouti answer, the compiler interprets as `int`, but if that is the case then why I am seeing dead code at `i`?

If I do `System.out.print(false ? 0 : x);` then I am getting `y`, so why in this case doesn't the compiler interpret as `int`?

Answer: 
`121` is the integer representation of the character `y`. Since you provided `i` as part of the expression, the compiler interprets it as a call to `System.out.print(int)` instead of `System.out.print(char)`.

Note that changing to `System.out.print(false ? (char)i : y);` prints `y`.
121 is ASCII code for **y** and as you have declared **i** as an integer, the compiler interprets **y** as int variable too. Thus printing an ASCII value for **y**. Writing **System.out.print(false ? (char)i : y)** will print **y**.