In java, there is no default port number, you have to specify the port number. But port number from 1 to 1023 are for root user only and Port number from 1024 to 65535 are non root user port.
you can directly use port numbers from 1024 to 65535 if they are available. For example, port 80 should be reserved for Http connection.
but you need root access for binding port number from 1 to 1023 because most of the services are running on this range of port number.
To know more in detail about Java.
TCCI-Tririd Computer Coaching Institute is focused on providing Quality education with practical sessions. Satisfaction of our student is our priority. We pride ourselves for providing proficient IT solutions.
Call us @ 9825618292