0% found this document useful (0 votes)
14 views1 page

Print Alphabet Using Java While Loop

This Java code uses a while loop to print out the alphabet from a to z. It initializes a character variable ch to 'a' and loops while ch is less than or equal to 'z'. Inside the loop, it prints the character ch and then increments ch by 1, causing the loop to print each character sequentially from a to z.

Uploaded by

khushii90
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views1 page

Print Alphabet Using Java While Loop

This Java code uses a while loop to print out the alphabet from a to z. It initializes a character variable ch to 'a' and loops while ch is less than or equal to 'z'. Inside the loop, it prints the character ch and then increments ch by 1, causing the loop to print each character sequentially from a to z.

Uploaded by

khushii90
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

import [Link].

*;
import [Link].*;
class PrintAlphabetWithWhileLoop
{
public static void main(String args[])
{
char ch = 'a';
while(ch<='z')
{
[Link](ch);
ch++;
}
}
}

You might also like