Hi All,
I have a newbie question which makes me struggle couple hours and search online for nothing. will you please kindly help me on this? i have no one to ask since i am study by my own. thank you for your time and support.
I don't understand that in the beginning of the for loop, "i" was init to 0 and (char) ('A' + i) remain 'A' which was assigned to array[0].char array[] = new char[10]; for (int i = 0; i < 10;){ array[i++] = (char)('A' + i); System.out.println("char for array is: " + array[0]); }
However, the result for array[0] is B. Not A.
can anyone welling to share the opinion? appreciate for your help.