charAt() for integers greater than 1?
<p>I am trying to create a program that displays the <code>x</code> and <code>y</code> coordinates of any given point, reflected across the linear function <code>ax+b</code>. However, I get a runtime error which says that it's out of bounds. I know you can't invoke methods on primitive data types, but I have no idea how else to get it. </p>

<pre><code>import java.util.*;
public class ReflectivePoint {
    public static void main (String[]args){
        Scanner lol = new Scanner(System.in);
        System.out.println("Please enter the linear function.");

        //That will be in the format ax+b
        String function = lol.nextLine();
        Scanner lol2 = new Scanner(System.in);
        System.out.println("Please enter the point.");

        //That will be in the format a,b
        String point = lol2.nextLine();
        int a = point.charAt(1);
        int b = point.charAt(3);
        int m = function.charAt(1);
        int c = function.charAt(4);
        int x1 = (2 / (m + 1 / m)) * (c + b - a / m) - a;
        int y1 = (-1/m) * x1 + a / m + b;
        System.out.println(x1+", "+y1);
    }
}
</code></pre>
