Reputation: 211
how can you edit the contents of an array list using a value generated by the user using the scanner class.
many thanks
Upvotes: 5
Views: 9368
Reputation: 240860
List<String> lst = new ArrayList<String>();
lst.add("a");
lst.add("b");
lst.add("c");
//now modifying contents
lst.set(1, "z");
Upvotes: 10