i have question about char array
how declare in java array of char from a to z
?
i mean char characters []=new char[]{a....z]?
thank
views:
36answers:
2
+3
A:
char[] alphabet = new char[26];
for(char c = 'a'; c <= 'z'; ++c) {
alphabet[c - 'a'] = c;
}
Sev
2010-06-15 06:57:44
A:
Declare an empty array, and fill it manually with a loop.
Pavel Radzivilovsky
2010-06-15 06:57:50