I need to make a program that displays each char value from a to z, basically listing the alphabet. How exactly would I do this? Should I use the for() method until I reach z?
Printable View
I need to make a program that displays each char value from a to z, basically listing the alphabet. How exactly would I do this? Should I use the for() method until I reach z?
each character has a numeric representation...if i'm not mistaken, A=65, B=66, ... Z=90, so you can have a for loop from 65 to 90, casting these ints into chars....
ps. these would print the characters in uppercase letters, look for an ASCII table to see their representation in lowecase.Code:for(int i=65;i<=90;i++) {
System.out.println((char)i);
}