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 -

jquery - ReferenceError: CKEDITOR is not defined -

android - Go back to previous fragment -