Comment on Tutorial - Recursion in java By aathishankaran



Comment Added by : praveen

Comment Added at : 2011-08-07 20:22:09

Comment on Tutorial : Recursion in java By aathishankaran
result = fact (n-1) * n;
i didn't got this concept ..
if i put n=3 then the answer is
(3-1)*3 = 6
and if i put n=4 the answer is
(4-1) *4= 12 but the real answer is 24 .how it's so. can u plz explain me . how it exactly works.


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. Does not work.
View Tutorial          By: Hallo at 2012-10-25 09:50:05

2. it worked fine in solving an algorithm assingment.
View Tutorial          By: tunde bello at 2009-11-05 06:31:28

3. why return&else statment repeating?
View Tutorial          By: sudhar at 2012-07-12 14:50:45

4. Very nice tutorial :)

I have teste

View Tutorial          By: yannoo95170 at 2015-06-18 00:30:26

5. Thanks a lot. It was very helpful
View Tutorial          By: Faith Justin at 2008-12-07 06:52:29

6. i want to study c-programming language
View Tutorial          By: rajesh at 2008-07-27 07:43:09

7. Can you tught me matrix function and friend functi
View Tutorial          By: Shiv pratap singh at 2013-01-12 06:46:46

8. hey thats a superb way of explaining in plain term
View Tutorial          By: Agastya at 2011-05-08 03:11:53

9. what are benefits of using overriding method?
View Tutorial          By: Ah Socheat at 2013-12-11 04:44:57

10. This should save some time

class pa

View Tutorial          By: vamsi gude at 2012-03-20 18:27:24