Zdravim, objasnil bz mi nekdo znaly, co dela kod na radcich 25,26,27 a 33, co znamena to "-" a tohle
lett >= ‘A’
Dekuji, clovek neznalemu programovani dela problem si pod tim neco predstavit.
20: int[] letterCount = new int[26];,
21: for (int count = 0; count < phrase,.length; count++) {
22: String current = phrase[count];
23: char[] letters = current.toCharArray();
24: for (int count2 = 0; count2 < letters.length; count2++) {
25: char lett = letters[count2];
26: if ( (lett >= ‘A’) & (lett <= ‘Z’) ) {
27: letterCount[lett - ‘A’]++;
28: }
29: }
30: }
31: for (char count = ‘A’; count <= ‘Z’; count++) {
32: System.out.print(count + “: “ +
33: letterCount[count - ‘A’] +
34: “ “);
35: }
36: System.out.println();