I'm supposed to fill this array of string with all the letters from the alphabet ex: "a","b","c","d", etc.
I've been staring at this for an hour and I confused on where to start? I was just introduced to arrays today in class so excuse my ignorance . Usually isn't an array filled like this String[] randomA = {'a','b','c'} etc. So I'm confused on how to fill it with a loop. Can someone tell me why they start with for ( char ch = )
in the for loop and point me in the right direction on how to start?
import java.util.Arrays;
public class Fill
{
public static void main(String[] args)
{
String[] letters = new String[26];
for (char ch = . . .; . . .; . . .)
{
letters[. . .] = . . .;
}
System.out.println(Arrays.toString(letters));
}
}