I understand, that a char can be casted explicitly by me and by compiler implicitly.
In my code in first "for" loop Compiler converts char to int type automatically by implicit type casting. Since char is of size 2 bytes, it get fit into size of 4 bytes.
I am confused, how a integer number be assigned to char variable without explicit casting, since int is of 4 bytes and without explicitly casting it to char using cast operator.
// Compiler converts char to int type automatically by implicit type casting.
for (int i = 'A'; i <= 'Z'; i++) {
System.out.print(i + " ");
} System.out.println();
for (char c = 65; c <= 90; c++) {
System.out.print(c + " ");
} System.out.println();