aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Advanced Java
  • Which of the following methods of Socket class in java re...
Multiple choice

Which of the following methods of Socket class in java returns the local port to which Socket object is connected?

  1. getInetAddress()

  2. getPort()

  3. getLocalPort()

  4. Socket()

  5. getInputStream()

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

This method of Socket class in java returns the local port to which Socket object is connected.

Keep practicing — related questions

  • In Java network programming, which of the following methods is/are defined in “InetAddress” class?
  • The assigned port at the server can be obtained in the client side by
  • Which of the following objects is used in java to plug around the network and have a standard way of delive...
  • A server runs on a specific computer and has ___________ that is bound to a specific port number.
  • In Java network programming, which of the following statements is/are used by the client to request a conne...
  • Which of the following communication links is bound to a port number so that the TCP layer can identify the...
  • Which of the following methods of Class returns a Class object for each of the public classes and interface...
  • Which of the following classes in the java.net package is used to read a stream of data that is generated b...
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Java Core Classes and Threads (1473 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy