Thursday, March 26, 2009

Alphabatical table using arrays

import java.util.Arrays;
public class testarrays
{
public static void main(String [] x)
{
char [] array1=new char[26];
for (int i = 'A' ,j=0;i<='Z';i++,j++)
array1[j]=(char)i;
System.out.println(Arrays.toString(array1));
}
}

0 comments: