Answers for "program to find the ascii values in java"

2

ascii in java

public class AsciiValue {

    public static void main(String[] args) {

        char ch = 'z';
        int ascii = ch;
        // You can also cast char to int
        int castAscii = (int) ch;

        System.out.println("The ASCII value of " + ch + " is: " + ascii);
        System.out.println("The ASCII value of " + ch + " is: " + castAscii);
    }
}
Posted by: Guest on April-09-2021
0

how to find the ascii value of special character in java

public class AsciiValue {

    public static void main(String[] args) {

        char ch = 'a';
        int ascii = ch;
        // You can also cast char to int
        int castAscii = (int) ch;

        System.out.println("The ASCII value of " + ch + " is: " + ascii);
        System.out.println("The ASCII value of " + ch + " is: " + castAscii);
    }
}
Posted by: Guest on March-03-2021

Code answers related to "program to find the ascii values in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language