Top Posters
Since Sunday
1
1
l
1
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 104 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
  927 People Browsing
Related Images
  
 2926
  
 7078
  
 172
Your Opinion
What's your favorite coffee beverage?
Votes: 299