Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java£ºµÝ¹éººÂÞËþÓÎÏ·×îÉÙµÄ×ß·¨

package game;
public class HanTaGame {
 public static void main(String[] args) {
  fun('1', '2', '3', 2);
 }
 // ººËþÓÎÏ·½â¾ö·½°¸
 public static void fun(char src, char idle, char dest, int n) {
  if (1 == n) {
   System.out.println(src + "--->" + dest);
   return;
  }
  //¶¨ÒåÒ»¸ö˳Ðò
  fun(src, dest, idle, n - 1);
  System.out.println(src + "--->" + dest);
  //½øÐÐ˳ÐòµÄ½»»»
  fun(idle, src, dest, n - 1);
 }
}


Ïà¹ØÎĵµ£º

JAVAÖÐÕýÔò±í´ïʽµÄÓ¦Óà (Ò»)

Jakarta-OROÕýÔò±í´ïʽ¿â
1£®¼ò½é£º
Jakarta-OROÊÇ×îÈ«ÃæÒÔ¼°ÓÅ»¯µÃ×îºÃµÄÕýÔò±í´ïʽAPIÖ®Ò»£¬Jakarta-ORO¿âÒÔǰ½Ð×öOROMatcher£¬ÊÇÓÉDaniel F. Savarese±àд£¬ºóÀ´Ëû½«ÆäÔùÓëJakarta Project£¬¶ÁÕß¿ÉÔÚApache.orgµÄÍøÕ¾ ÏÂÔØ¸ÃAPI°ü¡£
Ðí¶àÔ´´úÂ뿪·ÅµÄÕýÔò±í´ïʽ¿â¶¼ÊÇÖ§³ÖPerl5¼æÈݵÄÕýÔò±í´ïʽÓï·¨£¬Jakarta-OROÕýÔ ......

java£ºÊÖд¶þ²æÊ÷BinaryTreeÌí¼ÓºÍ²éѯ·½·¨

package arrays.myArray;
public class BinaryTree {
 private Node root;
 // Ìí¼ÓÊý¾Ý
 public void add(int data) {
  // µÝ¹éµ÷ÓÃ
  if (null == root)
   root = new Node(data, null, null);
  else
   addTree(root, data);
......

java£ºÈýÖÖ¾­µä´óÅÅÐò»ã×Ü£¬Ã°ÅÝ£¬²åÈ룬ѡÔñ

package arrays.myArray;
public class SortArr {
 public static void main(String[] args) {
  int[] arrInt = { 4, 7, 8, 5, 6, 3, 2, 3, 4 };
  maoPaoSort(arrInt);
  print("ðÅÝÅÅÐò£º", arrInt);
  arrInt = new int[]{ 4, 7, 8, 5, 6, 3, 2, 3, 4 };
 & ......

java£ºµÝ¹é£ºÉÏÂ¥ÌÝÿ´ÎÖ»ÄÜÒ»²½»òÕßÁ½²½£¬ÓжàÉÙ×ß·¨

package floatt;
public class Go {
 public static int i = 0;
 public static void main(String[] args){
  calc("", 5);
  System.out.println("×ܹ²ÓÐ"+i+"ÖÖ×ß·¨~");
 }
 
 //ÉÏÂ¥ÌÝÿ´ÎÖ»ÐèÒ»²½»òÕßÁ½²½£¬ÓжàÉÙ×ß·¨
 public static void calc(String lo ......

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 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ