Post

@EclipseJavaIDE Before calling method, char a and z are added and the result, which is integer, is passed. Outcome should be Z
English

@EclipseJavaIDE '+' operation would be performed on ASCII values of 'a' and 'z'. It will be 97+122=219. So depending on int 219 function hello(int i) would be invoked and consequently Z printed.
English

@EclipseJavaIDE Arithmetic ops involving char, byte, short will be elevated to int so help(int) is called with output 'Z'
English

@EclipseJavaIDE Answer: Z, a two primitive char when use arithmetically, the result will be primitive int.
English

@EclipseJavaIDE I know this but I also wrote a chapter about operator precedence and casting so... I may have cheated 🤣
English

@EclipseJavaIDE @EclipseFdn This will take param as int and prints Z.
English

@EclipseJavaIDE -hello( char bi) method accepts single parameter of type Char
-hello(int i) accepts single param type int
hello('a' + 'z')
-no single argument is passed to the method
-two arguments passed to this method are evaluated as the sum of the ASCII values (int) of chars a & z
Ans:Z
English


























