java£ºµÝ¹é£º10µÄ½×³Ë
package game;
public class JieCeng {
public static void main(String[] args){
System.out.println(fun(10));
}
public static int fun(int n){
if(1==n)
return 1;
System.out.println( n * fun(n-1));
return n * fun(n-1);
}
}
Ïà¹ØÎĵµ£º
µ±Á½¸ö½ø³ÌÔÚ½øÐÐÔ¶³ÌͨÐÅʱ£¬±Ë´Ë¿ÉÒÔ·¢Ë͸÷ÖÖÀàÐ͵ÄÊý¾Ý¡£ÎÞÂÛÊǺÎÖÖÀàÐ͵ÄÊý¾Ý£¬¶¼»áÒÔ¶þ½øÖÆÐòÁеÄÐÎʽÔÚÍøÂçÉÏ´«ËÍ¡£·¢ËÍ·½ÐèÒª°ÑÕâ¸öJava¶ÔÏóת»»Îª×Ö½ÚÐòÁУ¬²ÅÄÜÔÚÍøÂçÉÏ´«ËÍ£»½ÓÊÕ·½ÔòÐèÒª°Ñ×Ö½ÚÐòÁÐÔÙ»Ö¸´ÎªJava¶ÔÏó¡£
¡¡¡¡°ÑJava¶ÔÏóת»»Îª×Ö½ÚÐòÁеĹý³Ì³ÆΪ¶ÔÏóµÄÐòÁл¯¡£
¡¡¡¡°Ñ×Ö½ÚÐòÁлָ´ÎªJava¶ÔÏóµÄ¹ ......
package arrays.file;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
i ......
package arrays.myArray;
public class MyArrayList {
private Object[] arrObj = new Object[3];
private int size = 0;
// ³¤¶È
public int size() {
return size;
}
// insert
public void add(Object obj) {
add(size,obj);
&nb ......
package arrays.myArray;
public class MyLinkedList {
private int size = 0;
private Node1 head = null;
// Ìí¼Ó
public void add(Object obj) {
add(size, obj);
}
// ÐÞ¸Ä
public void add(int index, Object obj) {
if (null == head) ......
package arrays.myArray;
import java.util.Scanner;
public class SortObject {
private static int intercePosition = 0; // ¼Ç¼µ¥¸öÔËËãÊý¾ÝµÄ³¤¶È
private static int[] intercePositionIndex = null; // ¼Ç¼“£¨”µÄϱê
private static int[] intercePositionEnd = null; // ¼Ç¼ ......