Home » JAVA Programming » Basic Datatypes » Question
  1. What is the output of this program?

    class output {
    public static void main(String args[])
    {
    char var11 = 'A';
    char var12 = 'a';
    System.out.println((int)var11 + " " + (int)var12);
    }
    }
    1. 162
    2. 67 95
    3. 65 97
    4. 66 98
    5. None of these
Correct Option: C

ASCII code for ‘A’ is 65 and for ‘a’ is 97.
output: 65 97



Your comments will be displayed only after manual approval.