Now,I have a string String time= "200hour 0minute 0second"
I want to track numbers in string and convert to second..As above string..I want to get value 200\*3600..
My code:

```
    //change from hour minute to second
public String changeSecond(String time)
{
    String result;
    int ind_hour=time.indexOf("hour");
    int ind_minute=time.indexOf("minute");
    int ind_second=time.indexOf("second");

    int hour=Integer.parseInt(time.substring(0, ind_hour));
    int minute=Integer.parseInt(time.substring(ind_hour+1, ind_minute));;
    int second=Integer.parseInt(time.substring(ind_minute+1, ind_second));

    result=String.valueOf(hour*3600+minute*60+second);

    return result;
}

```

but when i run changeSecond(time).It don't work..How must I do.