Possible Duplicate:
How to concatenate two arrays in Java?
I have SET1 declared as a static String[] and I would like to declare SET2 as SET1 + few other parameters. Is it possible to declare SET2 statically similar (i.e. private static String[]) to SET1 but using the above definition, if not how to do this?
private static final String[] SET1 = { "1", "2", "3" };
SET2 = SET1 + { "4", "5", "6" };
Maybe lists are easier in this case since arrays are fixed in length (by nature). You could do something like this if you want to instantiate it statically.
Or use some kind of Collection utility library.
Look at Commons Util ArrayUtils.add:
It's a big ugly: