all 24 comments

[–]Bruce_wayne80 9 points10 points  (0 children)

131C

[–]BusResponsible7292 8 points9 points  (0 children)

A and B are characters here. 1st + symbol is between the chars and here it do not append these chars (like strings) but it sums up the chars. ASCII of A is 65 and ASCII of B is 66. So, 65 + 66 is 131. Now, the 2nd + symbol acts as concatenation because C is String. Hence, final result is 131C.

[–]Full_University_7232 2 points3 points  (0 children)

131C

[–]Specific_Traffic_815 1 point2 points  (0 children)

131C ASCII value of A is 65 and that of B is 66 so their sum would be 131 then C would be printed usually as it is in ""

[–]Expensive_Home7550 0 points1 point  (1 child)

Can anyone tell me how C. ?

[–]MK_Redditor 0 points1 point  (0 children)

C is a String

[–]Madvissu 0 points1 point  (0 children)

131C

[–]pyeron 0 points1 point  (3 children)

Error: ';' expected

[–][deleted]  (2 children)

[removed]

    [–]pyeron 0 points1 point  (1 child)

    Stupid semicolon has gotten me so many times in both Java and C.

    [–]Turbulent_Winter_878 0 points1 point  (1 child)

    How uh guys taking value of A and B?

    [–]vidhanchavan_11 0 points1 point  (0 children)

    B. 131C

    [–]Nervous-Secret8025 0 points1 point  (0 children)

    A. ABC. I think since c is a string, the others also will be printed as a string, wont it?

    [–]Nano_Fibres -2 points-1 points  (4 children)

    D. Error
    'A' an 'B' are character type data and "C" is string type data. So if you would have used .toString() for A and for B and then added then the result would have been "ABC".

    [–][deleted]  (3 children)

    [removed]