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: array program help

  1. #1
    Junior Member
    Join Date
    Feb 2012
    Thanked 0 Times in 0 Posts

    Default array program help

    i'm new to this array thing in java so i'm still trying to find how to make one
    could someone help me make a program like this:

    it's supposed to input the array size and the numbers
    (the user is the one to input the numbers on it)
    like this:

    Enter the array size: 5
    i[0] = 1
    i[1] = 2
    i[2] = 3
    i[3] = 4
    i[4] = 5

    after that it should show the ascending and descneding orders of the numbers
    like this:

    the ascending order is : 1,2,3,4,5

    the descending order is : 5,4,3,2,1,

    what is the value of: 2

    it should output the value of array number 2

    like this:

    the value of i[2] is 3

    and at the end it should ask if it wants to try again y/n
    (it will output again the "what is the value:" question if yes, if no then exit)

    any help will be appreciated, i really need to make this program for my assignment but i'm still confused on the whole array thing. thanks in advance

  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Washington, DC
    My Mood
    Thanked 636 Times in 540 Posts

    Default Re: array program help

    Recommended reading: Arrays (The Java™ Tutorials > Learning the Java Language > Language Basics)
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Problem with Two-Dimensional Array Program
    By soradogoof in forum Collections and Generics
    Replies: 26
    Last Post: February 20th, 2012, 08:17 PM
  2. array program assistance needed
    By JavaNoob82 in forum Collections and Generics
    Replies: 4
    Last Post: December 14th, 2009, 05:49 AM
  3. Array program help needed
    By SCM in forum Loops & Control Statements
    Replies: 2
    Last Post: December 2nd, 2009, 11:28 PM
  4. Average program with array and loop and JOptionPane.
    By jeremykatz in forum AWT / Java Swing
    Replies: 6
    Last Post: October 25th, 2009, 02:33 PM
  5. help me to do this Array Program
    By fahdsaad in forum Member Introductions
    Replies: 1
    Last Post: June 30th, 2009, 02:19 AM