Java Program to Print to Alphabets with ASCII Values

In this problem we will learn how to print Alphabets using ASCII values in Java. Before this we post the similar program in C++. The Alphabets has a special number and these numbers start from 65 . 65 is the starting ASCII number to write alphabets in upper case. Here is the source code of this program which help you in better understanding.

Source Code   


public class ASCII_Values {

public static void main(String[] args) {
System.out.println("\t \t \t LEP Tutorials \n \n \n");
System.out.println(" Print Alphabets with ASCII Values \n");
int alphabets;
for (int i = 65; i<91; i++)
{
System.out.print((char)i +" ");
}

}

}

Output of the Program

Print Alphabets with ASCII Values in Java
Print Alphabets with ASCII Values in Java


Share on Google Plus

About Asad

Asad Niazi is Software Engineer , Programmer, Web Developer and a young mentor of BloggersTown and PProgramming. Asad Love to writes about Technology, Programming, Blogging and make money online.

1 comments:

  1. A character and it's ASCII value can be used interchangeably. The ASCII value of alphabets are consecutive natural numbers. Java program to print ASCII value of alphabets Sample Java programs
    Programming tutorial

    ReplyDelete