Unable to figure runtime error in below code
<p>Hi iam unable to figure runtime error in below problem, Please can anyone resolve</p>

<pre><code>import java.util.Scanner;

class Solution6 {
    public static void main(String[] args)
    {
        boolean condition = false;
        do
        {
            Scanner scanner = new Scanner(System.in);
            String value = scanner.nextLine();
            condition = value.equalsIgnoreCase("exit");
            if(!condition &amp;&amp; value.contains(","))
            {
                calculate(value);
            }
        } while (!condition);
    }

    private static void calculate(String value)
    {
        final String[] event1 = value.split(",");
        int ss = 0;
        for ( int i = 0; i &lt; event1[0].length(); ++i )
        {
            char c = event1[0].charAt( i );
            ss += (int) c;
        }
        int sd = 0;
        for ( int i = 0; i &lt; event1[1].length(); ++i )
        {
            char c = event1[1].charAt( i );
            sd += (int) c;
        }

        System.out.println(ss-sd);
    }
}
</code></pre>
