Câu hỏi:

Trong lớp DatagramSocket phương thức khởi dựng để tạo kết nối UDP với số hiệu cổng là?

733 Lượt xem
05/11/2021
2.6 5 Đánh giá

A. Public void synchronized receive(DatagramPackage p) throws IOException

B.  Public void synchronized send(DatagramPackage p) throws IOException

C.  Public DatagramSocket() throws SocketException

D. Public DatagramSocket(int port) throws SocketException

Đăng Nhập để xem đáp án
Câu hỏi khác cùng đề thi
Câu 1:

UDP là viết tắt của?

A.  User Protocol Defined

B.  Under Datagram Package

C.  User Defined Protocol

D.  User Datagram Protocol

Xem đáp án

05/11/2021 4 Lượt xem

Câu 2:

Biểu thức nào sau đây không hợp lệ:

A.  int x=6;if(!(x>4)) { }

B.  int x=6;x*=x;

C.  int x=6;x=x>>>5;

D. String if="Hello";

Xem đáp án

05/11/2021 5 Lượt xem

Câu 3:

Trước khi gởi một DatagramPacket đi, ta có thể đặt dữ liệu gởi đi trênDatagramPacket này bằng phương thức ?

A. Public void setAddress(InternetAddress dis)

B.  Public void setData(byte buffer[])

C. Public void setPort(int port)

D. Public void setLength(int len)

Xem đáp án

05/11/2021 7 Lượt xem

Câu 4:

Trong lớp DatagramSocket phương thức nhận gói dữ liệu về là?

A.  Public void synchronized send(DatagramPackage p) throws IOException

B. Public void synchronized receive(DatagramPackage p) throws IOException

C. Public DatagramSocket(int port) throws SocketException

D.  Public DatagramSocket() throws SocketException

Xem đáp án

05/11/2021 3 Lượt xem

Xem đáp án

05/11/2021 7 Lượt xem

Chưa có bình luận

Đăng Nhập để viết bình luận

Bộ câu hỏi trắc nghiệm môn Lập trình mạng - Phần 2
Thông tin thêm
  • 42 Lượt thi
  • 60 Phút
  • 50 Câu hỏi
  • Người đi làm