Initial Commit

This commit is contained in:
2012-01-22 16:14:32 -05:00
commit f5e306f67f
155 changed files with 5097 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>RecursiveFactorial</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1,12 @@
#Fri Nov 26 08:35:17 EST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

Binary file not shown.

View File

@@ -0,0 +1,46 @@
/**
* @author Twenty Codes, LLC
* @author ricky barrette
* @date Nov 26, 2010
*/
/**
* this is a simple class to demonstrate java's recursive ability
* @author ricky barrette
*/
public class Main {
/**
* Creates a new Main
* @author ricky barrette
*/
public Main() {
System.out.println(factorial(5));
}
/**
* this method will calculate the factorial of an integer
* @param i
* @return the factorial of the supplied number
* @author ricky barrette
*/
private long factorial(int i) {
/*
* if the number is greater than 1, then we continue
* else we return our results
*/
if(i > 1)
return factorial(i -1) * i;
return i;
}
/**
* main method, called when the application starts
* @param args
* @author ricky barrette
*/
public static void main(String[] args) {
new Main();
}
}