I have no idea how to solve this exercise with a cast operator. Char '0' to decimal would be 48.
Does anyone have the solution?
Thank you
package de.codegym.task.task10.task1004;
/*
Aufgabe Nr. 4 zu Integer-Typumwandlungen
*/
public class Solution {
public static void main(String[] args) {
short zahl = 9;
char zero = '0';
int neun = Character.getNumericValue((zero + zahl));
System.out.println(neun);
}
}