Duplicating words

  • 5
Let's write an echo program. It repeats everything it hears. More precisely, everything in a list of 10 strings. The echo program will actually accomplish this by creating a list of 10 words (we'll enter strings from the keyboard and add them to the list), and the doubleValues ​​method will basically duplicate the words in a specific way. Then we'll display the resulting echo. Piece of cake.
You can't complete this task, because you're not signed in.
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Miha ČelešnikLevel 9 , Ilirska Bistrica
20 November 2019, 13:13
There is no need for method doubleValues to have return value, just use reference to original list and compute index instead of making whole new list.
BhaktiLevel 10 , Sydney
6 November 2019, 03:27
getting correct output but validation fails.Please help.
public static ArrayList<String> doubleValues(ArrayList<String> list) {
        //write your code here
        for(int i = 0;i< 20;i++)
RomanLevel 41
6 November 2019, 06:51
You have received this recommendation: "Be sure that the doubleValues method can work with lists of any length, not just 10."
SUSHANTLevel 10 , Delhi
7 July 2019, 07:54
Can someone tell why is it showing "cannot resolve symbol list"?
RomanLevel 41
8 July 2019, 05:42
Declare a string list variable and immediately initialize it. Have you done it before line 16?