Sort a stack in descending order
1 Code

In my opinion, your code would be a little more readable if you had a blank line before and after such constructs as while, for and if. So, instead of 

Random ran = new Random();
while (size &gt; 0) {
    inputStack.push(ran.nextInt(size));
    size--;
}
Stack&lt;Integer&gt; orderedStack = sortStack(inputStack);


you could have 

Random ran = new Random();

while (size &gt; 0) {
    inputStack.push(ran.nextInt(size));
    size--;
}

Stack&lt;Integer&gt; orderedStack = sortStack(inputStack);


2 printStack

Collections.&lt;Integer&gt;reverse(inputStack);
System.out.println(inputStack);


does the job with funky brackets and commas.

3 Naming

sortStackInAscending is not a very good name. Perhaps StackSorter?

4 Sorting

Usually, sorting routines do not return the sorted result, but rather modify its argument collection. That's the way most production sorts work in practice.

Summa summarum

A sub-point: making your stack sort generic is not hard; see below.

All in all, I had this in mind:

public class StackSorter {

    public static void main(String args[]) {
        Stack&lt;Integer&gt; inputStack = new Stack&lt;&gt;();
        int size = 10;
        Random ran = new Random();

        while (size &gt; 0) {
            inputStack.push(ran.nextInt(size));
            size--;
        }

        sortStack(inputStack);

        System.out.println("Stack is sorted: " + stackIsSorted(inputStack));
        Collections.&lt;Integer&gt;reverse(inputStack);
        System.out.println(inputStack);
    }

    public static &lt;E extends Comparable&lt;? super E&gt;&gt; 
        boolean stackIsSorted(final Stack&lt;E&gt; stack) {
        if (stack.isEmpty()) {
            // Trivially sorted.
            return true;
        }

        final Stack&lt;E&gt; workStack = new Stack&lt;&gt;();
        workStack.addAll(stack);

        E previousElement = workStack.pop();

        while (!workStack.isEmpty()) {
            final E currentElement = workStack.pop();

            if (currentElement.compareTo(previousElement) &gt; 0) {
                return false;
            }

            previousElement = currentElement;
        }

        return true;
    }

    public static &lt;E extends Comparable&lt;? super E&gt;&gt; 
        void sortStack(final Stack&lt;E&gt; inputStack) {
        final Stack&lt;E&gt; orderedStack = new Stack&lt;&gt;();
        E currentElement;
        int count = 0;

        while (!inputStack.isEmpty()) {
            currentElement = inputStack.pop();

            while (!orderedStack.isEmpty() 
                    &amp;&amp; currentElement.compareTo(orderedStack.peek()) &lt; 0) {
                inputStack.push(orderedStack.pop());
                count++;
            }

            orderedStack.push(currentElement);

            while (count &gt; 0) {
                orderedStack.push(inputStack.pop());
                count--;
            }
        }

        inputStack.addAll(orderedStack);
    }
}


Hope that helps.