System.out.println('j' + 'a' + 'v' + 'a')
a)java
b)418
c)'java'
d) none of the above
Answers
hope it helps you ❣❣
Mark me as brainliest
The output will be 418
The códe will be like this
public class Main
{
public static void main(String[] args) {
System.out.println('j' + 'a' + 'v' + 'a');
}
}
Output
418
Explanation
ASCII is the encoding format done to the text data in computers. ASCII full form is American Standard Code for Information Interchange.
A to Z letters are encoded from 65 to 90 such as A = 65, B = 66, and so on.
a to z letters are encoded from 97 to 122 such as a = 97, b = 98, and so on.
Now back to the question
System.out.println('j' + 'a' + 'v' + 'a');
Here j, a, v, a are strings which are encoded to ASCII format and added as plus (+) sign is there.
j = 106
a = 97
v = 118
Total value = j + a + v + a = 106 + 97 + 118 + 97 = 418
This is how output is coming to be 418