Possible Duplicate:
how to add new elements to a String[] array?
How can I add new item to the String array ? I am trying to add item to the initially empty String. Example :
String a [];
a.add("kk" );
a.add("pp");
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From arrays
So in the case of a String array, once you create it with some length, you can’t modify it,
but you can add elements until you fill it.
So if your requirement is to add many objects, it’s recommended that you use Lists like: