aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes can 2 while loop in method? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "can 2 while loop in method?" Watch "can 2 while loop in method?" New topic
Author

can 2 while loop in method?

kahkean chor
Ranch Hand

Joined: Jan 26, 2013
Posts: 56
is there correct if there are 2 while loop in a method to received difference data type

while(true){
readUtf()...... <-when string is received enter this loop
}


while(true){
readObject()...... <-when object and string is received enter this loop
readInt()......
}
Vinod Tiwari
Ranch Hand

Joined: Feb 06, 2008
Posts: 466
    
    1

A method can have any number of while loop. Not sure what you mean by received data type.


Vinod Tiwari | Twitter | Shikshanirman | Guftgu
kahkean chor
Ranch Hand

Joined: Jan 26, 2013
Posts: 56
ok ..i make an example

first time,server issue an string to client
but second time server issue an object to client....how to solve this problem
 
Consider Paul's rocket mass heater.
 
subject: can 2 while loop in method?