Skip to content

Instantly share code, notes, and snippets.

@talobin
Created April 17, 2014 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talobin/11007071 to your computer and use it in GitHub Desktop.
Save talobin/11007071 to your computer and use it in GitHub Desktop.
public class HelloWorld{
public static void main(String []args){
//test with 5
System.out.println("Test print(5)");
print(5);
//test with 10
System.out.println("Test print(10)");
print(10);
}
public static void print(int number){
System.out.println(number);
if (number > 1)
print(number-1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment