Srini Swami

Greenhorn
+ Follow
since May 14, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Srini Swami

Hi,

Which is the best way (performance) to implement a queue (large and unbounded). I am working with Java 1.4, so no queue classes.

Right now, I am using LinkedList to implement the queue. Do containers add substantial overhead ? Are there any ways for non-container implementation ?

Thanks
Srini
17 years ago
Hi,

I have the same doubt as Mat Matthew. In Sun's Java tutorial, they have specifically said about the new port the server uses.

"If everything goes well, the server accepts the connection. Upon acceptance, the server gets a new socket bound to a different port. It needs a new socket (and consequently a different port number) so that it can continue to listen to the original socket for connection requests while tending to the needs of the connected client."

But, the socket created by the server's accept() prints out the same port number. Why is this ?

Thanks
Srini