Java Program To Find ASCII Value Of Character

Write Java program to find ASCII value of given character

// WAP to find Ascii value of given character

import java.util.Scanner;
public class AsciiValue
    public static void main(String[] args)
        Scanner sc = new Scanner(;
        System.out.println("Enter a character :-->");
        char c =;
        int ascii = (int)c;

        System.out.println("Ascii value of "+c+" is : "+ascii);



<< Previous | Next >>