how can you edit the contents of an array list using a value generated by the user using the scanner class.
many thanks
List<String> lst = new ArrayList<String>();
lst.add("a");
lst.add("b");
lst.add("c");
//now modifying contents
lst.set(1, "z");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With