I got this simple code:
String ip = "1.2.3.4";
String[] ipArray = ip.split(".");
System.out.println(ipArray[1]);
And ipArray is null by the time it hits System.out.println (throws null pointer exception).
My question is why does ipArray stay null even though I'm setting it to split on each of ip's .s?