how to print ascii value 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);
}
}
Also in Java:
- how to open a webpage with java
- tolowercase java
- parallel sorting in java 8
- java arraylist to array
- capitalize string java
- java binary tree
- how to create a thread local variable in java
- leap year checker java
- how to make array of objects in java and use it
- libgdx move camera with touch
- creating file in specific location in java application
- to char array java
- init cap java
- java function that returns the index of the largest value in an array
- cgange background from button click java fx
- how to detect device javascirpt
- find frequency of each word in a string in java
- summary of operators java
- how to break two loop in java
- java thread
- java read file from command line argument
- how to initialize an array in java
- dictionary in java
- char array to string java