ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Java J2EE  >>  Java Related  >>  Java Networking
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
What is the difference between TCP and UDP ?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the difference between TCP and UDP ?
Answer
# 1
TCP is a Transmission Control Protocol. 
UDP is a User Datagram Protocol.
There are four major differences between UDP and TCP:
1. TCP can establishes a Connection and UDP cannot.
2. TCP provides a stream of unlimited length, UDP sends 
small packets.
3.TCP gurantees that as long as you have a connection data 
sent will arrive at the destination, UDP provides not 
guarantee delivery.
4.UDP is faster for sending small amounts of data since no 
connection setup is required, the data can be sent in less 
time then it takes for TCP to establish a connection.
 
Is This Answer Correct ?    48 Yes 0 No
A.v.sudheer
 
  Re: What is the difference between TCP and UDP ?
Answer
# 2
TCP is a connection oriented protocol, which means that 
everytime a packet is sent say from host A to B, we will 
get an acknowledgement. Whereas UDP on the other hand, is a 
connection less protocol.
Where will it be used : TCP -> Say you have a file transfer 
and you need to ensure that the file reaches intact, and 
time is not a factor, in such a case we can use TCP.

For more details : http://newadmins.blogspot.com/
 
Is This Answer Correct ?    25 Yes 6 No
Raja
 
 
 
  Re: What is the difference between TCP and UDP ?
Answer
# 3
TCP is a Transmission Control Protocol. 
UDP is a User Datagram Protocol.
TCP protocol is mainly used when we need report that our
data has trasferred succesfully or not,
while UDP doesnot check
 
Is This Answer Correct ?    5 Yes 1 No
Pankaj
 
  Re: What is the difference between TCP and UDP ?
Answer
# 4
1.	TCP(Transmission Control Protocol). TCP is a 
connection-oriented protocol, a connection can be made from 
client to server, and from then on any data can be sent 
along that connection. 
o	Reliable - when you send a message along a TCP 
socket, you know it will get there unless the connection 
fails completely. If it gets lost along the way, the server 
will re-request the lost part. This means complete 
integrity, things don't get corrupted. 
o	Ordered - if you send two messages along a 
connection, one after the other, you know the first message 
will get there first. You don't have to worry about data 
arriving in the wrong order. 
o	Heavyweight - when the low level parts of the 
TCP "stream" arrive in the wrong order, resend requests 
have to be sent, and all the out of sequence parts have to 
be put back together, so requires a bit of work to piece 
together. 
2.	UDP(User Datagram Protocol). A simpler message-
based connectionless protocol. With UDP you send messages
(packets) across the network in chunks. 
o	Unreliable - When you send a message, you don't 
know if it'll get there, it could get lost on the way. 
o	Not ordered - If you send two messages out, you 
don't know what order they'll arrive in. 
o	Lightweight - No ordering of messages, no tracking 
connections, etc. It's just fire and forget! This means 
it's a lot quicker, and the network card / OS have to do 
very little work to translate the data back from the 
packets.
 
Is This Answer Correct ?    6 Yes 0 No
Surendran
 
  Re: What is the difference between TCP and UDP ?
Answer
# 5
1.tcp is connection oriented udp is connectionless
tcp is reliable udp is not;
 
Is This Answer Correct ?    2 Yes 0 No
Sujeetha
 

 
 
 
Other Java Networking Interview Questions
 
  Question Asked @ Answers
 
What is the connection keep-alive feature of HTTP 1.1?  2
Is it possible to send an object using Sockets, if so, how it can be? TCS1
What is meant by time-slicing?  4
What is IP?  2
What is a port?  5
Is there any difference between TCP/IP and TCP?  2
What is Domain Naming Service (DNS)?  2
What is URL?  4
What is the difference between TCP/IP and UDP?  3
Write the range of multicast socket IP address?  1
How does server know that a client is connected to it or not?  1
What is Inet address?  6
What is the purpose of HTTP tunneling?  4
What is meant by TCP, IP, UDP? Wipro7
What is the difference between TCP and UDP ?  5
What is InetAddress? CTS2
 
For more Java Networking Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com