Love the idea for the quiz
Makes me want to learn java better.
Yes it compiles and the result is 1
You're basically mixing casts with operators ....
So you first have -1, then you cast it to long so it's gonna be long -1
Then you have + unary operation so it remains long -1, then you cast it to int => int -1
Then you have - operation => int 1, after cast to char => char 1
After + operation so it's gonna be char 1
Then cast to byte => byte 1
And in the end implicitly cast to int => int 1
Think that's about right.
I have no idea for the next challenge cuzz i don't know java that well