Computer Applications

Write a program in Java to generate all the alternate letters in the range of letters from A to Z.

Java

Java Library Classes

83 Likes

Answer

public class KboatAlternateLetters
{
    public static void main(String args[]) {
        for (char ch = 'A'; ch <= 'Z'; ch = (char)(ch + 2)) {
            System.out.println(ch);
        }
    }
}

Variable Description Table

Program Explanation

Output

Answered By

42 Likes


Related Questions