Auto increment alphabet in Java : There is two solution for auto increment alphabet using java :

Solution 1 :

for (char alphabet = 'A'; alphabet <= 'Z'; alphabet++) {
    System.out.println(alphabet);
}

Solution 2 : It is also possible with typecasting

for (int i = 65; i <= 90; i++) {
    System.out.println((char)i);
}

Read also : Java 7 – Java 8 – loop Map / List – forEach examples

Read also : Twitter teste une façon de limiter les réponses à vos Tweets

Laisser un commentaire