Java convert short to char
In this Java core tutorial we learn how to convert a short value into char value in Java programming language.
How to convert short to char in Java
In Java, with a given short value to can cast it to char value as the following example Java code.
ConvertShortToCharExample1.java
public class ConvertShortToCharExample1 {
public static void main(String... args) {
short shortValue = 69;
char charValue = (char)shortValue;
System.out.println("short value: " + shortValue);
System.out.println("char value: " + charValue);
}
}
short value: 69
char value: E
Happy Coding 😊
Related Articles
Java convert short to BigInteger