Created
March 24, 2017 04:09
-
-
Save aalonzolu/048574568ebb5e8fb321e6f8345c2b49 to your computer and use it in GitHub Desktop.
Java recursive method example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int restar(number){ | |
if(number>0){ | |
number = number-1; | |
restar(number); | |
} | |
else{ | |
return number; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment