<div><br>I think in this instance you'd be best to utilise a Vector as you can get this to increase by a specified increment when it needs to grow during runtime which you obviously can't do with your array, using the Constructor version Vector(int
<em>size</em>, int <em>incr</em>).</div>
<div> </div>
<div>Apparently, you can still then assign this to an Array for more advanced manipulation via:</div>
<div> </div>
<div>int count = yourVector.size();<br>String[] yourArray = new String[count];<br>yourVector.copyInto(yourArray);<br> </div>
<div>I'd like to say I made this all up myself, but I got some of this information from <a href="http://www.devx.com/tips/Tip/13044">http://www.devx.com/tips/Tip/13044</a></div>
<div> </div>
<div>I'm also wondering if there is a newer way to do this since my Java knowledge is now quite old...</div>
<div> </div>
<div>Hope this helps...</div>
<div> </div>
<div>Regards,</div>
<div>Darren.<br> </div>
<div><span class="gmail_quote">On 12/6/05, <b class="gmail_sendername">Stephen Elliott</b> <<a href="mailto:techweb@ntlworld.com">techweb@ntlworld.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi there,<br><br><br>I have a quick Java question I'd like to run past any Java Gurus out there.<br>I am writing a multi-thread chat server programming using RMI and want to
<br>store all the<br>messages users send to each other in an array. The purpose being, when<br>someone new joins the chat room they will receive all previous messages<br>users have sent to one another. So far all I can do is store a predefined
<br>amount e.g. 100. I have achieved this by creating a string array with 100<br>elements. What I would like to do is be able to store an infinite number of<br>messages but is it possible to create an array with an infinite number of
<br>elements.<br><br>I hope what I have said makes sense, this is as you've probably guessed an<br>assignment we have been given at University. I have asked my lecturer and he<br>says this is beyond the scope of the course but to me it seems foolhardy to
<br>write a program that will crash once 100 messages have been relayed.<br><br>Many Thanks<br>Steve...<br>--<br>No virus found in this outgoing message.<br>Checked by AVG Free Edition.<br>Version: 7.1.362 / Virus Database:
267.13.12/192 - Release Date: 05/12/2005<br><br><br>_______________________________________________<br>Beds mailing list<br><a href="mailto:Beds@mailman.lug.org.uk">Beds@mailman.lug.org.uk</a><br><a href="http://mailman.lug.org.uk/mailman/listinfo/beds">
http://mailman.lug.org.uk/mailman/listinfo/beds</a><br></blockquote></div><br>