StringIndexOutOfBoundsException
StringIndexOutOfBoundsException: String Index out of range: 13
I'm getting this error on the following code:
public URLReader(String URL){
String inputLine;
int k, inicioNome, tamURL = URL.length();
System.out.println(tamURL);// <- Displays the right value
System.out.println(URL);// <- Displays the right value
System.out.println(URL.charAt(1));// <- Displays the right value
System.out.println(URL.substring(1,12)); // <- Displays the right value
for(k=tamURL+1;k>0;k--)
if((URL.charAt(k) == '/') || (URL.charAt(k) == '\\'))//### <- Here is the problem....
inicioNome = k;
...
Do You know what is wrong...

