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.
I wrote a project which need to serialize a String from Server to Client.How should i deal with it?I tried to put all the String in an ArrayList.But i can not turn the ArrayList to String.What should i do? Thank you for your help.
I would give you some warnings By you question your are probably planing to make all the business logic in your client side but think about when you will use the networked environment... what happens when your client get disconnected from server ?
Client call: 1- lock 2- update -- get disconnected
that wouldn't be easy to handle with. So I made an OO framework that contains all the business logic (book, unbook and search) and my remote object provides this funcionality.
Originally posted by sheng peng: I wrote a project which need to serialize a String from Server to Client.How should i deal with it?I tried to put all the String in an ArrayList.But i can not turn the ArrayList to String.What should i do? Thank you for your help.
Why can't you turn the ArrayList into a String? What have you tried? Not knowing what you have done / not done makes it very hard to offer suggestions that you can learn by (rather than just presenting solutions which is not a very good way for you to learn).
But to give you another solution, converting the ArrayList to a String:The for loop which I created to show that it did convert the data for me is a bit faulty, but it is there just to demonstrate the two lines that are the actual conversion, so I am not worried about them.
Regards, Andrew [ August 23, 2005: Message edited by: Andrew Monkhouse ]