When I try this code in a new project, I have this error:
java.lang.ArrayIndexOutOfBoundsException: 0 at line 4
String temp = "Capture.png";
System.out.println(temp);
String[] temp2 = temp.split(".");
System.out.println(temp2[0]);
The main action is to verify the extension of the file but when I'm trying this, the split function doesn't work.