SPPU
TY BBA(Computer Applications) 2019 CBCS Pattern
Question
Write a ‘java’ program to display characters from ‘A’ to ‘Z | TYBBACA Slips 2019 CBCS Pattern Core Java
Solution
Hey, folks, today I will help you in solving core java slips of BCA of T.Y.B.C.A.In this program, you’ll learn to print English alphabets using for loop in Java. You’ll also learn to print only uppercase and lowercase alphabets.
For Printing Uppercase alphabet.
class alphabetloop
{
public static void main(String[] args) {
for(char c = 'A'; c <= 'Z'; ++c)
System.out.println(c + "");
}
}
Output:
For Printing Lowercase alphabet.
class alphabetloop{ public static void main(String[] args) { for(char c = 'a'; c <= 'z'; ++c) System.out.println(c + "");
}}