ilan Expert Licensed User Longtime User Mar 1, 2016 #1 hi when i create an array of objects i have to set the length of the array at the beginning but what if i would like to add a new object to this array? is it possible? in java it is: Code: Copy var fruits = ["Banana", "Orange", "Apple", "Mango"]; fruits[4] = "Lemon";
hi when i create an array of objects i have to set the length of the array at the beginning but what if i would like to add a new object to this array? is it possible? in java it is: Code: Copy var fruits = ["Banana", "Orange", "Apple", "Mango"]; fruits[4] = "Lemon";
Erel B4X founder Staff member Licensed User Longtime User Mar 1, 2016 #21 B4A List wraps the Java ArrayList. They are the same thing. Upvote 0
ilan Expert Licensed User Longtime User Mar 1, 2016 #22 Erel said: B4A List wraps the Java ArrayList. They are the same thing. Click to expand... ooppsss. Sorry, but i need a list and not an array. I watched box2d tutorials and there they use an arraylist so i thought i will need to use an array in b4a. Sorry for creating this thread. With a list it will be much simpler. Thank you everybody Upvote 0
Erel said: B4A List wraps the Java ArrayList. They are the same thing. Click to expand... ooppsss. Sorry, but i need a list and not an array. I watched box2d tutorials and there they use an arraylist so i thought i will need to use an array in b4a. Sorry for creating this thread. With a list it will be much simpler. Thank you everybody