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.


>> REGISTER NOW TO START POSTING


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

1 Visitor Messages

  1. neeeeeew to java and i was given this assignment:

    "Write an app that loads 20 random integers into an array. The random values should be
    positive values less than 50. Write the numbers out to the screen. Then write the numbers to
    the screen in reverse order.

    Example output:

    The numbers in order are:

    21 3 7 17 43 31 19 21 40 2 37 28 15 5 48 35 11 2 0 33

    The numbers in reverse order are:

    33 0 2 11 35 48 5 15 28 37 2 40 21 19 31 43 17 7 3 21"

    help meeee



    this is all i have so far:

    int[] a;
    a = new int[20];
    int b;
    for(b=0; b<20; b++)
    {
    a[b] = (int)(Math.random()*50.0);
    }
    System.out.println("The numbers in order are:");
    System.out.print(a[0] + " ");
Showing Visitor Messages 1 to 1 of 1
About nerdster

Basic Information

About nerdster
Java Skill Level:
Beginner

Statistics


Total Posts
Total Posts
1
Posts Per Day
0.00
Visitor Messages
Total Messages
1
Most Recent Message
October 4th, 2012 11:03 PM
Total Thanks
Total Thanks
0
  • Thanked 0 Times in 0 Posts
General Information
Last Activity
October 4th, 2012 11:11 PM
Join Date
October 4th, 2012