You know that you can solve problems in many ways, right? Yes, of course you know that. However, in this particular task we'll ask you to recall the for loop and use it to perform some manipulations. Here's what you need to do: enter 10 numbers from the keyboard, put them in a list, and then display them in reverse order.
Display numbers in reverse order
- 2
Locked
Comments (12)
- Popular
- New
- Old
You must be signed in to leave a comment
miguel
13 August 2021, 19:30
I have the solution...
But in IntelliJ Idea I have this ...
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 10
at com.codegym.task.task07.task0704.Solution.main(Solution.java:21)
Process finished with exit code 1
In codegym's page I don't have issues...
Why??
0
John Squirrels Website Admin at CodeGym
14 August 2021, 11:01
Please use the Help option within the task menu, if you are having issues with verification.
0
Jokeres
3 March 2021, 14:28
maybe fix the description of the task:
It's not "a for() loop"
It's "for() loops"
just because i was thinking on it for like 10 min when i gave up how the hell should i do it with only 1 for() loop and checked the correct answer where it had 2
0
Gellert Varga
11 July 2021, 15:38
True, I'm not a professional English speaker, but didn't the requirement say
"use a single for loop" or "use one single for loop"...
0
Roman Grygorczuk
13 September 2020, 18:50
Be sure that you are reading integers from the keyboard
0
Derick
18 April 2020, 01:54
Why am I get this wrong : Read 10 integers from the keyboard and add them to the list
+1
Roman
21 April 2020, 05:49
Please post your question with the attached solution in the section Help.
0
Philippe “Imissyou” Haavik
11 December 2019, 17:35
Anyone having troubles. Ask yourself this question. Is it imported?
0
Zserbo
22 June 2019, 18:01
for any of you who get an error for the immediate initialization: You should use ArrayList in this task. Not a List.
0
Sourav Kumar Rana
19 January 2019, 19:25
cannot find symbol symbol: class ArrayList location: class com.codegym.task.task07.task0719.Solution:
Solution.java, line: 19, column: 8
0
Roman
21 January 2019, 06:30
Please use the Help section within the task if you are having difficulties with your code.
0
Daniel Knox
10 December 2018, 21:38
Would be nice if we could use an array since we know the size of it beforehand.
+1