Question: Given the following piece of Java code, assuming that address is an InetAddress instance and port is an int variable and both of them have

Given the following piece of Java code, assuming that address is an InetAddress instance and port is an int variable and both of them have been assigned with appropriate value, this piece of code sends out a UDP packet while calling udpServerSocket.send(udpPacket2) by using address as the _________ ip address and port as the _________ port number.
......
udpPacket2= new DatagramPacket(buf2, buf2.length, address, port);
udpServerSocket.send(udpPacket2);
......
Given the following piece of Java code, assuming that address is an InetAddress instance and port is an int variable and both of them have been assigned with appropriate value, this piece of code sends out a UDP packet while calling udpServerSocket.send(udpPacket2) by using address as the _________ ip address and port as the _________ port number.
......
udpPacket2= new DatagramPacket(buf2, buf2.length, address, port);
udpServerSocket.send(udpPacket2);
......
destination, source
destination, destination
source, source
source, destination

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!