<<< Explicit casting examples | Index | The Math class >>> |
char letterChar = 65; // convert int to char (letterChar = 'A') char letterChar2 = (char) 65; // this works too int letterInt = 'A'; // convert char to int (letterInt = 65) int letterInt2 = (int) 'A'; // this works too
<<< Explicit casting examples | Index | The Math class >>> |