Multiple choice

In Java network programming, which of the following statements is/are used by the client to request a connection to the server?

  1. Socket s1 = new Socket(“130.12.23.24”,8000);

  2. Socket s1 = new Socket(130.12.23.24,8000);

  3. Socket s1 = new Socket(“darke.armstrong.edu”,8000);

  4. Only 1 and 3

  5. 1, 2 and 3

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

This is the correct choice.