Java char type Question 2

Question

What is the output of the following code?

public class Main {
   public static void main(String[] args) {
      char x = 'a';
      char y = 'c';
      System.out.println(++x);
      System.out.println(y++);
      System.out.println(x - y);
   }
}


b
c
-2



PreviousNext

Related