Answer the question
In order to leave comments, you need to log in
What's not to like about ArrayList?
Good!
Simple question but can't figure out the problem. There is an array of strings, I want to fill it with data, but I don’t understand the errors
private ArrayList<String> dataList = new ArrayList<>();
publick void myFun ()
{
for (int i = 0; i<2; ++i)
dataList.add(null);
String s = "ss";
dataList.get(0) =s; //не нравится эта строчка, подчёркивает красным
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question