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
87 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
44 Likes
Related Questions
Write a program in Java to input a character. Find and display the next 10th character in the ASCII table.
Write a program in Java to input a character. Display next 5 characters.
Write a program to input a set of 20 letters. Convert each letter into upper case. Find and display the number of vowels and number of consonants present in the set of given letters.
Write a program in Java to accept an integer number N such that 0<N<27. Display the corresponding letter of the alphabet (i.e. the letter at position N).
[Hint: If N =1 then display A]