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

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++;
 }
}


Ïà¹ØÎĵµ£º

Java Ï̱߳à³ÌÖеÄͬ²½¡¢Öظ´¡¢¶¨Ê±

£¨Ò»£©Ïß³Ìͬ²½
ʵÏÖÉú²úÕßÏû·ÑÕßÎÊÌâÀ´ËµÃ÷Ïß³ÌÎÊÌâ,¾ÙÀýÈçÏÂËùʾ:
/**
* Éú²úÕßÏû·ÑÕßÎÊÌâ
*/
public class ProducerConsumer {

/**
* Ö÷·½·¨
*/
public static void main(String[] args) {
ProductBox pb = new ProductBox ......

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

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

java£ºdoubleÀàÐͽØÈ¡Á©Î»Ð¡Êý£¬²»È¡Éᣬ

public class Split{
 public static void main(String[] args){
       double pai = 3.14159;
        findTwo(pai);
  public static void findTwo(double value){
    System.out.println(new DecimalFormat("0.##"). ......

java£ºÊÖдMyLinkedListËùÓз½·¨£¬Ôöɾ¸Ä²é

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) ......

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