/**RecursionBasic1 demonstrates recursion.
*
* @author (TK Rogers)
* @version (10-11-13)
*/

public class RecursionBasic1 {

public static void main ( ) {

System.out.println (whatsItDo(4)) ;

}

public static int whatsItDo( int n ) {

if ( n == 0 ) return 1 ;
int x = whatsItDo( n-1 ) ;
return ( x *= n ) ;

}
}