```
public static void main(String[] args) 
{

    String st = "10+300";
    int result;
    for(int i=0;i<st.length();i++)
    {

        if(st.charAt(i)=='+')
        {
            result=Integer.parseInt(st);//getting error in this line
            System.out.print(result);
        }         
    }

}

```