logo CodeStepByStep logo

PromptNumbers2

Language/Type: Java arrays Scanner input
Related Links:

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
Class: Write a complete Java class.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.