Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  

Variable length arrays?



Share on Google+Share on Google+

R Varma
Variable length arrays?
0 Answer(s)      5 years and 7 months ago
Posted in : Java Beginners


I enjoy reading from your site especially the example seem to speak louder than the description. Thanks for your service.

I would like to know what type data structure can be used to represent a variable length string array such as the following

itemList[0] = {"rose", "jasmine", "lily"}; itemList[1] = {"lotus"}; itemList[2] = {"apple", "orange", "pear", "grapes"}; itemList[3] = {"cucumber", "corn"}; itemList[4} = {"maple", "oak", "elm", "teak", "pine", "cedar"};

Basically, I am trying to find out if there is a standard datatype available or I have to define an object of arrays or if there is a smart way to handle this.

Thanks for your help. Varma

View Answers