Question
Create a new Java class called: Alphabet Write a Java application program that will print the uppercase letters of the English alphabet to the screen,
Create a new Java class called: Alphabet
Write a Java application program that will print the uppercase letters of the English alphabet to the screen, all on one line, each one separated by a space.
The output of this program should look like this:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
This program always produces the same result every time it is executed. This program does not get any values from the keyboard, and therefore does NOT need an import statment, and does NOT need a "Scanner keyboard" line to set up the keyboard.
Program Restrictions
You CANNOT use any print statements that print literals to the screen. A literal is any value that is not stored in a variable. For example, the following lines are prohibited in this program:
System.out.println("A B C D E F G..."); System.out.println('A' + 'B' + 'C' + 'D'...); System.out.println("A" + "B" + "C" + "D");
You ONLY allowed to use print statements that print variables to the screen. (i.e. System.out.println(myVariable); // where myVariable is a variable that is holding some value)
You CANNOT use any String variables in your program.
You CANNOT use more than 2 variables in your program.
Hint
Think about the ASCII / Unicode tables, and the fact that character variables actually do store integer values.
Think about how integers can be type cast into characters
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started