开发者

editing the contents of an array list

开发者 https://www.devze.com 2023-01-27 11:03 出处:网络
how can you edit the contents of an array list using a value generated by the 开发者_如何学编程user using the scanner class.

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");
0

精彩评论

暂无评论...
验证码 换一张
取 消