How to create arrays dynamically??
i have an arraylist with object arrays in it
the number of object arrays added to this arraylist may vary
while iterating through this arraylist i want to dynamically create array for all entries of this arraylist (elements are object arrays)
for this i need to dynamically give name to arrays so how it is possible to declear an array refrence of to name an array dynamically
i have tried thorough java.lang.reflect.Array but if any body can give me an example for such a problem will be a great help
Re: How to create arrays dynamically??
Are you asking how to add a new variable name to a compiled program while it is executing?
how it is possible to declear an array refrence of to name an array dynamically
You can get that effect by using a Map with the key being the "name" of the value.
You can create new values and references to those values at execution time.
If this is not what you want, Can you explain what you are trying to do?