Q:

java stacks and an apparent pointless exercise

I'm trying to verify my understanding of stacks.  While I'm starting to understand the basics and I still have a ways to go, I found an example that piqued my curiosity.
My research included this thread:
Understanding Postfix-expression Evaluation in Java code using a stack
I am confused by one line in particular from the thread I referenced above.
Here is the entire section of code - my question refers to the line inside the while loop - details after the code:
     public static void main(String[] args)
    {
    char[] a = args[0].toCharArray();
    int N =a.length;
    intStack s = new intStack();
    for (int i = 0; i<N; i++)
    {
        if (a[i]=='+')
        {
            s.push(s.pop() + s.pop());
        }
        if (a[i]=='*')
        {
            s.push(s.pop() * s.pop());
        }
        if ((a[i] >= '0') && (a[i] <= '9'))
        {
            s.push(0);
        }
        while ((a[i] >= '0') && (a[i] <= '9'))
        {
            s.push(10*s.pop() + (a[i++]-'0'));
        }
        Out.println(s.pop() + "");
    }
    }

My question is this: what purpose does the -'0' serve?  If I understand the rest of the line properly, we are referencing the char 0 (due to the single quotes) and the - appears to be the operator for subtraction.  Subtracting zero - a hard-coded zero, as opposed to a variable that just might happen to be zero occasionally - seems pointless.
My current assumption is that there is a finely nuanced answer to this - i.e. it only /appears/ to be a pointless exercise, but there is something truly magical happening that I am simply too dim to understand.
Thanks in advance to everyone here - I've been learning a great deal from the advice - this has quickly become one of my favorite and most-visited sites.
Best regards

A:

Since a is an array of char that holds numerical digits, a[i++]-'0' is a quick way of getting the numerical value of the char at a[i++]. Think of it as subtracting the ASCII code for 0 from the ASCII code for whatever is in that position of the character array.

