The reason you pass both an address and a port number to bind(), is because a computer may have multiple network cards, and each network card has a separate IP address, and perhaps you only want to accept incoming connections on some particular network card. (Note that the "loopback" interface, used for "localhost" local connections, also counts as a "network card" or interface.)
If you just want to listen for connections on a particular port, on all available interfaces, you should set the address part to INADDR_ANY (which ends up resolving to 0.0.0.0)
If you're using Java, it may use slightly different names for functions and constants than the canonical sockets API. For example, if there's a constructor for a socket that takes only a port number, then perhaps that constructor already binds to that port. (This socket would then have to have an accept() method that actually returns new sockets for remote connections, if you're using TCP.)
If you're using C, you also have to use htons() when filling out the sockaddr_in struct. Java will likely do that for you.
Finally, it's important to know the difference between your network-local address (of the PC/workstation/server,) and the IP-public internet address (the address of your router or DNAT box.) In most situations these days, they are different, and the public interface (router) needs to be set up to "port forward" or "DMZ" incoming connections to the appropriate internal address of the server.