Low port Scanner
In this section, you will learn how to get local port number of the local machine. Here, we define the name of program LowPortScanner. In this we check the argument and create a socket object. This program mainly display the massage on the command line very low port information. The java.net package provides two classes a socket and ServerSocket that implement the client side of the connection and server side of the connection, respectively. The Socket classes are used to represent the connection between a client program and a server program.
Here is the code of this program:
Output of this program: