0 votes
52 views
in General by (0 points)
closed by
How many times will the following method print the statement “Print this
line.” out, if a value of 10 is passed as the parameter?
public void message(int n) {
if(n > 0) {
 System.out.println(“Print this line.”);
 message(n – 1);}
 }

a. 9
b. 10
c. 8
d. An infinite number of times
closed

1 Answer

0 votes
by (0 points)
 
Best answer
b

Related questions

0 votes
1 answer 406 views
0 votes
1 answer 72 views
0 votes
1 answer 61 views
asked May 9, 2023 in General by Admin (0 points)

2.8k questions

2.8k answers

0 comments

76 users

Welcome to MCQ Village Q&A, where you can ask questions and receive answers from other members of the community.
...