Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • please post full error log Commented Jun 18, 2019 at 6:38
  • please check again @Fartab Commented Jun 18, 2019 at 6:39
  • The error you posted says that array does not have add method. what is the type of array? please mention its declaration. Commented Jun 18, 2019 at 6:41
  • ArrayList<String> array = new ArrayList <>(); @Fartab, I can add values to it but I can only add 1 value at a time, I need it to be 4 values at once. Commented Jun 18, 2019 at 6:44
  • you need to use 'push', like: array.push(item1, item2, ..., itemX), the add-method doen't work Commented Jun 18, 2019 at 6:44