is it possible to use try catch exception inside while loop?
while(username_ctr <= 5){
try{
user1 = str_div[username_ctr].indexOf("open_pm_tab",username_start);
user2 = str_div[username_ctr].indexOf("')", user1);
user3 = str_div[username_ctr].lastIndexOf(',', user2) + 3;
str_username[username_ctr] = str_div[username_ctr].substring(user3, user2);
//System.out.println(str_div[username_ctr].substring(user3, user2));
username_ctr++;
}catch(Exception e){
slash1 = str_div[username_ctr].indexOf("</font", 0);
slash2 = str_div[username_ctr].lastIndexOf('*', slash1);
//System.out.println(slash1);
//System.out.println(slash2);
//System.out.println(str_div[username_ctr].substring(slash1, slash2));
//System.out.println(str_div[1].substring(slash2,slash1));
username_ctr++;
}
}
here's my problem.
when i got exception, it will go to catch statement, right?
but after it go to catch statement, it does not go back again to try statement even it does not get an error.