This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi I have done what I hope is a 3 dimensional array, all I am doing is to get it to print out Liverpool and the 3 flight numbers, but i am confused over the  if i have the right values as it print outs "rubbish" flights "rubbish" here is my code so far,
Joined: Feb 07, 2003
Sorry I should have pointed out I wanted to print all flights from Liverpool 3 in all Thanks if you can advise Lindsey
hope this helps.... sorry ...u told that i shoudn't post the code in earlier post but i am unable to explain otherwise.. here u will need dynamic list (String) as you don't know how many flights matches your input. now u can't do that just using String. so u have two options now, 1. use Vector of String (which can have dynamic elements added to it) 2. use some other structure to store dynamic listing Vector would be little complex as you need String as return value of the method. java.awt.List sounds wiered but thats what i 've used so many times as it provides flexibility. no other Java class allows us to just go on adding string in String format AND retrieve the list by just one method call, which is list.getItems() in this case. regards maulin.
Joined: Nov 04, 2001
and as far as ur mistake is concerned.. u 've it at ,
result = new String;// not sure what figure goes here result[i] = tdi;
as u said u were not sure about new String statement.. u can't put it there as otherwise u'd end up creating new array for each matching Airport input and so the latest one would be returned having only one of the flight (as previous list is forgotten now when we do new String).. u get what i am trying to explain? so u have to create it only ONCE and you should be able to ADD dynamically to that result as you encounter matches... regards maulin
Joined: Feb 07, 2003
Thanks a million I will log off now and try rewriting my code, it seems what we get told and what you guys do are worlds apart. thanks again for your help and I hope the weather in your country is warmer than it is here in the UK good night lindsey
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com