tags:

views:

36

answers:

2

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

+3  A: 
char[] alphabet = new char[26];
for(char c = 'a'; c <= 'z'; ++c) {
    alphabet[c - 'a'] = c;
}
Sev
A: 

Declare an empty array, and fill it manually with a loop.

Pavel Radzivilovsky