19. How to convert char to in
💡Code:
public class CharToIntConversion7078 {
public static void main(String[] args) {
// Example char
char charValue = 'A';
// Convert char to int using ASCII value
int intValue = (int) charValue;
// Print the converted int value
System.out.println("Converted int value: " + intValue);
}
}
📸Output :