I have a problem in returning type in Java. 
The program is about decomposing an integer of 5 chiffres to an array without using predefined methods just with classic algorithm in a recursive way.
I wrote the code and it work well with recursion, 
but when I catch the new array from the method it doesn't return a single value in each case but it returns two to 5 chiffres in one single case.
What I want to achieve is this:

> 
> 12345 >> [1][2][3][4][5]
> 
> 
> 

but my algorithm gave me this:

> 
> 12345 >> [0][12][123][1234][12345]
> 
> 
> 

I guess that the problem is in the returning type or in declaring method.

This is the my Code: 

```
public class recursive {

  static int[] Decompose (int[] tab , int pos,int num) //pos for position
  {
    if (pos == 0) //if it reach the last element of the table it stop
    {
      return tab;
    } 
    else {
      tab[pos]=num;
      return Decompose(tab,pos-1,num/10); // if we didn't reach the end continue ...    
    }

  }

  public static void main(String[] args) {
    int []t = new int[5];

    int n=12345;//the number that i want to decompose
    int pos=4;//the indicator of table position

    t=Decompose(t,pos,n);

    for (int i = 0; i < t.length; i++) {
        System.out.println(t[i]);
    }
  }
}

```