Top Posters
Since Sunday
w
5
a
3
j
2
a
2
t
2
u
2
r
2
j
2
j
2
l
2
d
2
y
2
New Topic  
Eels Eels
wrote...
Posts: 716
Rep: 0 0
7 years ago
How many times will the following method call itself, if 10 is passed as the argument?

public static void message(int n)
{
   if (n > 0)
   {
     System.out.println("Print this line.\n");
     message(n + 1);
   }
}

A) 10
B) 9
C) 1
D) an infinite number of times
Textbook 
Starting Out with Java: Early Objects

Starting Out with Java: Early Objects


Edition: 4th
Author:
Read 139 times
2 Replies
Replies
Answer verified by a subject expert
blitheringblithering
wrote...
Posts: 354
Rep: 9 0
7 years ago
Sign in or Sign up in seconds to unlock everything for free
More solutions for this book are available here
1
University of Notre Dame

Related Topics

Eels Author
wrote...
7 years ago
I was nearly about to give up, thanks
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1721 People Browsing
 127 Signed Up Today
Related Images
  
 287
  
 287
  
 361
Your Opinion
What percentage of nature vs. nurture dictates human intelligence?
Votes: 436

Previous poll results: Who's your favorite biologist?