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.
a server support muliple client connections, the clients create some objects and store them on the server, these objects should be each assigned a unique number. my question is how to generate them, by who, server or client? thank you X HOU
If you are saving this info to a file or files you could generate a random number or better yet to insure no duplicates use the time and date as the filename. If you have the user creating multiple files at one time then you could use the date + time + a number representing that files contents (eg 11180105309 where 11 18 01 is the date 05 30 is the time and 9 is the number you are using to signify what particular object you are representing in that file. [This message has been edited by Matthew Margolis (edited November 19, 2001).]