Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Java converts characters into integers.
Java converts characters into integers.
Import java.util. *;

Public class TT{

Public static void main(String[] args){

char[]c = new char[26];

for(int I = 0; I & lt26; i++){

c[I]=(char)(' a '+I);

}

for(int j = 0; j & lt26; j++){

System.out.printf("%d ",(int)c[j]);

}

}

}

I think the first conversion test is the forced conversion of characters and integers. A-z is converted to 97- 122 without assignment, because the ASCII value of A is 97, and so on. I don't understand the conversion from 0-9 to 48-57, just +48. . I don't know what the latter one means.