Top Posters
Since Sunday
5
k
4
c
4
M
3
t
3
i
3
B
3
k
3
m
3
c
3
o
3
l
3
New Topic  
Eels Eels
wrote...
Posts: 716
Rep: 0 0
7 years ago
Look at the following method.

public static int test2(int x, int y)
{
  if ( x < y)
  {
    return -5;
  }
  else
  {
    return (test2(x - y, y + 5) + 6);
  }
}

What is returned for test2(18,5)?
A) 1
B) -5
C) 6
D) 7
Textbook 
Starting Out with Java: Early Objects

Starting Out with Java: Early Objects


Edition: 4th
Author:
Read 103 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
This helped so much
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  928 People Browsing
Related Images
  
 419
  
 7073
  
 302
Your Opinion
Who will win the 2024 president election?
Votes: 8
Closes: November 4

Previous poll results: Who's your favorite biologist?