You can't do it the way you wanted.
Use ArrayList
instead:
List<String> a = new ArrayList<String>();
a.add("kk");
a.add("pp");
And then you can have an array again by using toArray
:
String[] myArray = new String[a.size()];
a.toArray(myArray);