Multiple choice technology programming languages

If a client is run, when the server is not up

  1. Null Pointer Exception at client side

  2. Client will receive warning message

  3. ConnectException is thrown

  4. Compilation Error

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

When a client attempts to connect to a server that is not running, Java throws a ConnectException. This is a runtime exception indicating the connection was refused because no server is listening at the specified host and port.