public class Solution { public static void main(String[] args) throws Exception { // Read strings from the console and declare an ArrayList here ArrayList<String > list = new ArrayList<String>(); BufferedReader r = new BufferedReader(new InputStreamReader(System.in)); for(int i=0;i<10;i++){ String s = r.readLine(); list.add(s); } ArrayList<String> result = doubleValues(list); // Display result for(String s: doubleValues(list) ){ System.out.println(s); } } public static ArrayList<String> doubleValues(ArrayList<String> list) { //write your code here ArrayList<String> list1 = new ArrayList<String>(); for(int i=0;i<list1.size();i++) { for (int g = 0; g < 3; g++) { list1.add( list.get(i)); } } return list1; } } My code looks like above. what is wrong with the code