for (int i = 0; i < args.length; i++) { try { Socket socket = new Socket(args, 80); System.out.print(“Connected to ” + socket.getInetAddress()); System.out.print(” on port ” + socket.getPort()); System.out.print(” from port ” + socket.getLocalPort()); System.out.println(” of ” + socket.getLocalAddress()); } catch(UnknownHostException e) { e.printStackTrace(); } catch(SocketException e) { e.printStackTrace(); } catch(IOException e) { e.printStackTrace(); } Chương trình sau thực hiện công việc gì?

for (int i = 0; i < args.length; i++) {

try {

Socket socket = new Socket(args, 80);

System.out.print(“Connected to ” + socket.getInetAddress());

System.out.print(” on port ” + socket.getPort());

System.out.print(” from port ” + socket.getLocalPort());

System.out.println(” of ” + socket.getLocalAddress());

} catch(UnknownHostException e) {

e.printStackTrace();

} catch(SocketException e) {

e.printStackTrace();

} catch(IOException e) {

e.printStackTrace();

}

Chương trình sau thực hiện công việc gì?

A. Kết nối đến một webserver nào đó.

B.  Tạo một địa chỉ IP từ mảng byte, chuỗi String.

C. Cho địa chỉ, tìm tên máy.

D.  Không có đáp án đúng.

Hướng dẫn

Chọn D là đáp án đúng

 

Thư viện tài liệu12 Tháng bảy, 2023 @ 2:51 chiều

Đánh giá chủ đề này
How to whitelist website on AdBlocker?

How to whitelist website on AdBlocker?

  1. 1 Click on the AdBlock Plus icon on the top right corner of your browser
  2. 2 Click on "Enabled on this site" from the AdBlock Plus option
  3. 3 Refresh the page and start browsing the site