java£ºµÝ¹é£º10ԪǮ°´1£¬2£¬5ÔªÈÎÒâ×éºÏ
package game;
public class Money {
public static void main(String[] args) {
fun("", 10);
System.out.println("×ܹ²Ëã·¨£º" + i);
}
// 10ԪǮµÄ×é³É£¬1£¬2£¬5ÈÎÒâ×éºÏ
public static int i = 1;
public static void fun(String log, int n) {
// int num = n;
if (0 == n) {
System.out.println(log.substring(0, log.length() - 1) + "=");
return;
} else if (1 == n) {
System.out.println(log + "1" + "=");
return;
}
if (n >= 1)
fun(log + "1+", n - 1);
if (n >= 2)
fun(log + "2+", n - 2);
if (n >= 5)
fun(log + "5+", n - 5);
i++;
}
}
Ïà¹ØÎĵµ£º
Jakarta-OROÕýÔò±í´ïʽ¿â
1£®¼ò½é£º
Jakarta-OROÊÇ×îÈ«ÃæÒÔ¼°ÓÅ»¯µÃ×îºÃµÄÕýÔò±í´ïʽAPIÖ®Ò»£¬Jakarta-ORO¿âÒÔÇ°½Ð×öOROMatcher£¬ÊÇÓÉDaniel F. Savarese±àд£¬ºóÀ´Ëû½«ÆäÔùÓëJakarta Project£¬¶ÁÕß¿ÉÔÚApache.orgµÄÍøÕ¾ ÏÂÔظÃAPI°ü¡£
Ðí¶àÔ´´úÂ뿪·ÅµÄÕýÔò±í´ïʽ¿â¶¼ÊÇÖ§³ÖPerl5¼æÈݵÄÕýÔò±í´ïʽÓï·¨£¬Jakarta-OROÕýÔ ......
Öйú¹«ÀúËã·¨²»ÊÇÌ«ÄÑ£¬¹Ø¼üÊÇÐÇÆÚÖµµÄÈ·¶¨¡£ÕâÀï¸ø³öÁ˼òµ¥Ëã·¨£º
public static int dayOfWeek(int y, int m, int d) {
int w = 1; // ¹«ÀúÒ»ÄêÒ»ÔÂÒ»ÈÕÊÇÐÇÆÚÒ»£¬ËùÒÔÆðʼֵΪÐÇÆÚÈÕ
y = (y-1)%400 + 1; //&n ......
package arrays.compara;
/**
*
* @author Happy ¶þ·Ö²éÕÒ·¨
*/
public class BinarySearch {
public static void main(String[] args) {
int[] arrInt = { 2, 34, 32, 24, 23, 34, 12, 3, 4, 2 };
int index = bSearch(29, arrInt, 0, arrInt.length);
& ......
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 ......