0
Casting in Java
Can someone tell me what I've done wrong here? I have to output the int value of a char using cast. import java.util.Scanner; class Main { public static void main(String[] args) { Scanner read = new Scanner(System.in); char a = read.next().charAt(0); //your code goes here int b =(int)a; System.out.println(b); }
1 Odpowiedź
+ 3
Missing a '}' after System.out.println(b);