What will be the output of the following code?
char x = 'A';
int m; m = (x == 'a') ? 'A' : 'a';
System.out.println("m = " + m);
Views 24
Answer:
Output: m = 97
(Since the ASCII value of 'a' is 97)
Related Articles:
This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of Java Programming Language, click the links and dive deeper into this subject.
Join Our telegram group to ask Questions
Click below button to join our groups.