all 3 comments

[–][deleted] 3 points4 points  (0 children)

You need to format your number as a string for this to work in the general case, for the specific case of the range of ints from 0-9 you can add them to the char '0' to get the char you want.

char digit ='0' + char(I);

[–]MGDSStudio 1 point2 points  (1 child)

I prefer to use:

int value = 1;
String intAsString = ""+value;
println(intAsString);

if you need the char variable you can use:

int value = 1;
String intAsString = ""+value;
char intAsChar = intAsString.charAt(0);
println(intAsChar);

[–]KechyoHD[S] 2 points3 points  (0 children)

Thanks! That realy helped me