From C# to Java
<p>Can someone help me convert this C# function to java function? </p>

<p>Could i make some simple for loop instead of all these foreach?</p>

<pre><code> static Queue RadixSort(Queue Items, int Digits)
    {

        int Digit = Digits - 1;
        while (Digit &gt;= 0)
        {
            Queue Zero = new Queue();
            Queue One = new Queue();
            Queue Two = new Queue();
            Queue Three = new Queue();
            Queue Four = new Queue();
            Queue Five = new Queue();
            Queue Six = new Queue();
            Queue Seven = new Queue();
            Queue Eight = new Queue();
            Queue Nine = new Queue();
            int UpperLimit = Items.Count;
            int counter = 1;
            while (counter &lt;= UpperLimit)
            {
                int i = Convert.ToInt32(Items.Dequeue());
                counter++;

                switch (i.ToString().PadLeft(Digits, '0')[Digit])
                {
                    case '0':
                        Zero.Enqueue(i);
                        continue;
                    case '1':
                        One.Enqueue(i);
                        continue;
                    case '2':
                        Two.Enqueue(i);
                        continue;
                    case '3':
                        Three.Enqueue(i);
                        continue;
                    case '4':
                        Four.Enqueue(i);
                        continue;
                    case '5':
                        Five.Enqueue(i);
                        continue;
                    case '6':
                        Six.Enqueue(i);
                        continue;
                    case '7':
                        Seven.Enqueue(i);
                        continue;
                    case '8':
                        Eight.Enqueue(i);
                        continue;
                    case '9':
                        Nine.Enqueue(i);
                        continue;
                }
            }
            Items = new Queue();
            foreach (int i in Zero)
            {
                Items.Enqueue(i);
            }
            foreach (int i in One)
            {
                Items.Enqueue(i);
            }
            foreach (int i in Two)
            {
                Items.Enqueue(i);
            }
            foreach (int i in Three)
            {
                Items.Enqueue(i);
            }
            foreach (int i in Four)
            {
                Items.Enqueue(i);
            }
            foreach (int i in Five)
            {
                Items.Enqueue(i);
            }
            foreach (int i in Six)
            {
                Items.Enqueue(i);
            }
            foreach (int i in Seven)
            {
                Items.Enqueue(i);
            }
            foreach (int i in Eight)
            {
                Items.Enqueue(i);
            }
            foreach (int i in Nine)
            {
                Items.Enqueue(i);
            }
            Digit--;
        }
        return Items;
    }
</code></pre>
