Which of these method of DatagramPacket is used to find the length of byte array?
A. getnumber()
B. length()
C. Length()
D. getLength()
Answer:A
Which of these method of DatagramPacket is used to find the length of byte array?
A. getnumber() B. length() C. Length() D. getLength()
Explanation: getLength returns the length of the valid data contained in the byte array that would be returned from the getData () method. This typically is not equal to length of whole byte array.