Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Alphabet Program

  1. #1
    Junior Member
    Join Date
    Apr 2013
    Thanked 0 Times in 0 Posts

    Default Alphabet Program

    So I have to write this program and I have no idea what I'm doing. Here are my requirements:

    Create a program that stores the characters in an array at compile time. The program should display (from the array), on separate lines:

    1. The entire alphabet alphabetized.
    2. The entire alphabet in reverse order.
    3. The first letter of the alphabet
    4. The first ten characters of the alphabet.
    5. The last five characters of the alphabet
    6. The tenth letter of the alphabet.

    Here is what I have so far

    import java.io.*;
    import java.util.*;

    public class Alphabet {

    public static char [] theAlphabet = new char [26];
    public static void main(String[] args) {

    creation ();

    System.out.println("The alphabet: ");
    print (0,25)

    System.out.println("The alphabet in reverse: ");
    print (25,0)

    System.out.println("First letter of the alphabet: ");
    print (0)

    System.out.println("First ten letters of the alphabet: ");
    print (0,9)

    System.out.println("Last five letters of the alphabet: ");
    print (21,25)

    System.out.println("Tenth letter of the alphabet: ");
    print (9)

    char ch;

    for( ch = 'a' ; ch <= 'z' ; ch++ )

    Please help me finish this. I have no idea what I'm doing

  2. #2
    Join Date
    Apr 2012
    Thanked 4 Times in 4 Posts

    Default Re: Alphabet Program

    To begin with, you should put your code in the code tags so it's easier to read. Secondly, from the looks of it you have made no attempt to add or test any output or code. You already made the array thats gonna hold the 26 characters, so I can tell you that in your main you're going to want to add the characters to the array. I'm sorry to say, nobody is going to help you finish this code as it is.

Similar Threads

  1. Print a letter of the alphabet based on a number that is input
    By justlearning in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 20th, 2013, 01:36 PM
  2. Trying to create an alphabet-only string of any length
    By skw4712 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: November 19th, 2012, 06:39 AM
  3. Easy Help...Printing out the alphabet.
    By Jsmooth in forum Loops & Control Statements
    Replies: 13
    Last Post: April 15th, 2012, 07:28 PM
  4. Alphabet from sprite sheet
    By Asido in forum Java Theory & Questions
    Replies: 2
    Last Post: September 18th, 2010, 11:49 AM
  5. Listing the alphabet in lower and uppercase
    By Nemphiz in forum Object Oriented Programming
    Replies: 2
    Last Post: May 25th, 2010, 05:25 PM