|
-
recursive method to comput psF(n)
can someone explain to me how recursive methods work
we went over it in class but i was not listening and now i'am to scared to tell the teacher. can't focus for more than 50 mins at a time
how can you use a method within it self
static int psF(int n) {
if(n<2)
return n;
else
return 2*psF(n-1)+psF(n-2);
}
how can he use a method call with in a method
Last edited by Mcody2; 11-30-2006 at 03:30 PM.
Similar Threads
-
Replies: 2
Last Post: 09-03-2008, 10:14 AM
-
Replies: 2
Last Post: 08-05-2006, 10:40 PM
-
Replies: 1
Last Post: 04-21-2006, 11:51 AM
-
Replies: 1
Last Post: 04-13-2006, 04:57 AM
-
Replies: 3
Last Post: 04-13-2001, 09:13 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks