Manipulating lists in Java is almost as easy and enjoyable as manipulating people! Anyway, about those lists. Here's what you need to do: create a list and add 5 strings. Then remove the last string and insert it at the beginning. Repeat this manipulation 13 times and then display the contents of the list. Why? Don't ask, just believe: it's necessary.
Remove and insert
- 5
Locked
Comments (11)
- Popular
- New
- Old
You must be signed in to leave a comment
Hisham Thabet
2 November 2021, 07:54
It's so easy but I don't know why this exercise takes a long time from me.
However, I learned a lot from searching in google and reading the documentation. After then 30 times I solve it.
0
George Chijarira
4 February 2021, 23:26
Why didn't you provide an example this task? it is unnessesarily poorly explained. and an exmaple would solve that
0
Enoma Uwaifo
6 June 2020, 13:31
For the very first time I saw a problem that I was completely clueless about how the program is suppose to perform the task. This question was kind of confusing probably because of the word "remove". Going by that word, I was tempted to use the String.remove() method which wasn't working at all. I knew it even before I used it but my lack of understanding of the question didn't help matters. I think an example should've been given to enable a better understanding of how the output is suppose to look like or something or maybe another word should be used instead of "remove".
0
Sanjay Chauhan
4 February 2020, 15:27
Bonjour,
Will it be possible to check what I am doing wrong?
0
Roman
5 February 2020, 08:12
Please refer to Help section at our course.
0
Goff
10 October 2019, 10:03
Just a tip: do not remove and insert. First insert, and then remove.
0
BlueJavaBanana
11 April 2020, 16:52
Could you be so kind as to explain in clear English what the task actually requires?
I really don't know what it is expecting, as far as I can tell, my code works but it fails the last two requirements. Thank you.
0
Jason
3 July 2019, 08:51
Once again the wording for a task is horrible. For those wondering you only have to display the values for the final list that was created after you resorted them 13 times not each time you have them resorted. This non-specific wording but the extremely specific expectation of output has become tiresome, to say the least.
+1
BlueJavaBanana
11 April 2020, 16:52
Could you be so kind as to explain in clear English what the task actually requires?
I really don't know what it is expecting, as far as I can tell, my code works but it fails the last two requirements. Thank you.
0
Adrie Taniwidjaja
16 May 2019, 03:30
Yes, this task is very confusing. Just because I don't understand that the total number of remove and repeat must be 13 times (not 14 - actually if we read the sentence logically it should be 14) I am stuck at thinking what kind of syntax (or logic) that was wrong in my code.
0
Justin Case
12 December 2018, 20:05
Remove and insert. Rinse and repeat 13 times altogether! ... NOT rinse and repeat 13 times after a first remove and insert!
+2