logo Practice-It logo

PromptNumbers2

Language/Type: Java arrays Scanner input
Author: Marty Stepp (on 2011/11/13)

Modify your PromptNumbers program from the previous exercise so that it uses a static method to print the elements in forward order and another static method to print the array elements in backward order. The program's behavior should be the same as before.

How many numbers will you enter? 4
Type a number: 12
Type a number: 8
Type a number: -2
Type a number: 39

Your numbers in forward order:
12
8
-2
39

Your numbers in backward order:
39
-2
8
12
Type your solution here:


This problem asks for a complete program. Write a complete Java program as a class with a main method. (You do not need to write any import statements.)

You must log in before you can solve this problem.


Log In

If you do not understand how to solve a problem or why your solution doesn't work, please contact your TA or instructor.
If something seems wrong with the site (errors, slow performance, incorrect problems/tests, etc.), please

Is there a problem? Contact a site administrator.