A ________ is used to create a client socket in Java.
- DatagramSocket
- InetAddress
- ServerSocket
- Socket
In Java, to create a client socket, you use the Socket class. It allows you to establish a connection to a remote server and communicate with it. The other options represent different types of socket classes in Java but are not used for creating client sockets.
Loading...
Related Quiz
- If a class has multiple constructors, it can be said to have constructor ________.
- Which of the following is a valid method to execute a stored procedure using JDBC?
- A ________ is a result-bearing computation that can be canceled and can compute the result asynchronously provided by ExecutorService.
- In which scenarios is it recommended to create a custom exception instead of using a standard Java exception?
- What will be the result of the following Stream operation: Stream.of("a", "b", "c").filter(e -> e.contains("b")).findFirst();?