Click here to Skip to main content
15,867,488 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to add arrays . for ex: A= {1,2,3} B={5,6,7} resultant array should be c={1,2,3,5,6,7} ;
how ?
Plz help me
Thanks
Posted
Updated 22-Jul-12 18:39pm
v2

Check if the java arrays have an 'add' method. If not, create a new array the right size and copy both sets of values in, in two loops.
 
Share this answer
 
You can use a ArrayList and add the arrays with addAll then do a toArray with the results to get an array of objects.
 
Share this answer
 
Convert array to arrayList , then add both arrayList and convert back them to array..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900