Can someone please help me find the problem with the following code: it keeps giving me an:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
code
public class Hello{
public static void main(String[] args){
String tf = "192.168.40.1";
String[] arggg = tf.split(".");
String add = arggg[0];
System.out.println(add);
}
}
arggg? What is the parameter forsplitmeant to be?