How i covert a ASII code (which is store in a variable) into char in java. | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

How i covert a ASII code (which is store in a variable) into char in java.

plz give the answer

21st Jan 2019, 5:44 PM
Ronak Paul
Ronak Paul - avatar
1 Réponse
+ 11
●explicit typecasting from int to char. //here is an example in Java : for(int x=0;x<255;x++){ char y=(char)x; //using (char) to convert int to char [explicit typecasting] System.out.println(x+" ==> "+y); }
21st Jan 2019, 6:09 PM
Gaurav Agrawal
Gaurav Agrawal - avatar