• Sathish Kumar 286
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Hi All,

I was writing a sample code on Nested List. 
public class NestedListDemo {
    List<String> toDoList  = new List<String>{'laundry','shopping'};
    List<String> laundryList = new List<String>{'lights','darks'};
    List<String> groceryList = new List<String>{'fruits','vegetables'};
    List<List<String>> completeList = new List<List<String>>();
    completeList.add(toDoList);
    completeList.add(laundryList);
    completeList.add(groceryList);
    System.debug('Contents of toDoList'+toDoList);
    System.debug('Contents of groceryList'+groceryList);
    System.debug('Contents of laundryList'+laundryList);
    System.debug('Contents of completeList'+completeList);
    System.debug('Contents of First Element in completeList'+completeList[1]);

}

I am getting error in line 9. Error "Error: Compile Error: unexpected token: ')' at line 9 column 29".
any help would be appreciated.
Thanks in Advance