I\'m trying to make a little chat program for experimentation, but seeing as I\'m not the best Java programmer, I don\'t know how to separate a port from an IP where they are bo
Use String.split IP = splittedIP[0], Port = splittedIP[1] in String you will need Integer.parseInt to get the integer value of port
String[] ipSplit = "127.0.0.1:80".split(":"); String ip = ipSplit[0]; int port = Integer.parseInt(ipSplit[1]);