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
public static void main(String args[]){ String allTogether= "ip:port"; String[] array; if(allTogether.contains(":")){ array = allTogether.split(":"); String ip = array[0]; String port = array[1]; System.out.println(ip); System.out.println(port); } }