This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Originally posted by Parameswaran Thangavel: hi alll Can anybody tell me how we can declare an array and increase its size dynamically..... i.e the no of elements to be put in an array can be determined at runtime.
Once an array object is instantiated, it's size it fixed -- it can't be increased dynamically. You have two options...
You can instantiate another array and copy the elements to the new array.
Use a collection class instead.
Henry [ June 30, 2006: Message edited by: Henry Wong ]