java arraylist example with no symbol resolved -


i'm unsure why isn't working.

arraylist<string> test1 = new arraylist<string>(); string[] input = new string[]{"biggest", "next", "not"}; test1.add(input); 

there's error in 3rd line, @ add. editor says symbol cannot resolved, , test, typed test1. , ctrl + spaced see give me, no suggestion. help?

by using add can add list defined in generic, string in case. isn´t valid since try add array of string list. achive addall function this.

arraylist<string> test1 = new arraylist<string>(); string[] input = new string[]{"biggest", "next", "not"}; test1.addall(arrays.aslist(input)); 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -