Character to Integer Type Casting
What does the program output?
public class Main {
public static void main(String[] args) {
char letter = 'C';
int result = letter;
System.out.println(result);
}
}
A
Undefined
B
Compilation Error
C
C
D
67
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | solsaloe | 1 | 2 | 0m 00s | 90 |
| #2 | ntgamja1 | 1 | 1 | 0m 36s | 64 |
| #3 | jaimonjosh | 1 | 1 | 0m 43s | 57 |
| #4 | richa.tuli | 1 | 2 | 1m 12s | 18 |
| #5 | busemagngr | 0 | 2 | 0m 04s | -24 |
| #6 | lsj08030922 | 1 | 3 | 5m 56s | -276 |
Items per page:
10
1 – 6 of 6
APFIVE