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

¶þ²æÊ÷ (Binary Tree) µÄ»ù±¾²Ù×÷ (Java)

package algorithm.binarytree;
import java.util.Arrays;
import java.util.Stack;
import util.ArrayUtil;
import util.OutputUtil;
public class BinTree {
    private BinNode root = null;
    public BinTree()
    {
    }
    public BinTree(int data[])
    {
        if(data == null || data.length == 0)
        {
            root = null;
            return;
        }
        root = buildInOrder(data, 0, data.length - 1);
    }
   
    private BinNode buildInOrder(int data[], int start, int end)
    {
        if(start > end)
        {
            return null;
        }
        int mid = (start + end) >> 1;
       
        BinNode lc = buildInOrder(data, start, mid - 1);
        BinNode rc = buildInOrder(data, mid + 1, end);
        return new BinNode(data[mid], lc, rc);
    }
    public BinNode getRoot() {
        return root;
    }
    public void setRoot(BinNode root) {
        this.root = root;
    }
    public void insert(BinNode parent, int value, boolean isLeft)
    {
        if(parent == null)
        {
            roo


Ïà¹ØÎĵµ£º

JAVA¶¨Ê±Ö´ÐÐÈÎÎñ

Tomcat ϵĶ¨Ê±ÈÎÎñ
SysContextListener.java
package axtic.servlet;
import java.util.Timer;//¶¨Ê±Æ÷Àà
import axtic.bean.exportHistoryBean;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
public class SysContextListener implements ServletContextListener
......

Ò»¸ö¼òµ¥µÄJava·ÂÕæ³ÌÐò

ÕâÊÇÒ»¸ö¼òµ¥µÄ·ÂÕæ³ÌÐò:
ÔÚÕâ¸ö·ÂÕæ³ÌÐòÖÐ,»¨Ô°Î¯Ô±»á¶¼Ï£ÍûÁ˽âÿÌìͨ¹ý´óÃŽøÈ빫԰µÄ×ÜÈËÊý.ÿ¸ö´óÃŶ¼ÓÐÒ»¸öÊ®×Ö
תÃÅ»òijÖÖÆäËûÐÎʽµÄ¼ÆÊýÆ÷,²¢ÇÒÈκÎÒ»¸öÊ®×ÖתÃŵļÆÊýÆ÷µÝÔöʱ,¾Í±íʾ¹«Ô°ÖеÄ×ÜÈËÊýµÄ¹²Ïí
¼ÆÊýÖµÒ²»áµÝÔö
package OrnamentalGarden;
import java.util.Random;
/**
* ÕâÀïʹÓõ¥¸öµ ......

ÉîÈë½âÎöJavaµÄÐÂÌØÐÔassertion

 
ÎÒÃǾ­³£ÏÂÔØ¿ªÔ´ÏîÄ¿µÄÔ´ÂëÔÚ±¾µØ±àÒë,ÊDz»ÊǾ­³£±»Ò»¾ä"assert expression"¸ø¸ãµÃ±àÒë²»¹ýÈ¥£¬¾­³£ÊÇÔÚÀÏ°æ±¾µÄjdk±àÒëÆ÷ÏÂû°ì·¨£¬ÏÂÃæ¾ÍÏò´ó¼ÒÍƼöһƪÉîÈë·ÖÎöjava assertionµÄÎÄÕ¡£
Ò»¡¢assertionµÄÓï·¨ºÍÓïÒå
J2SE 1.4ÔÚÓïÑÔÉÏÌṩÁËÒ»¸öÐÂÌØÐÔ£¬¾ÍÊÇassertion(¶ÏÑÔ)¹¦ÄÜ£¬ËüÊǸð汾ÔÚJavaÓïÑÔ·½Ãæ×î´ ......

java³£¼û´íÎóÒÔ¼°¿ÉÄÜÔ­Òò¼¯½õ

0¡¢ ÐèÒª±êʶ·û
a) ²»ÔÚº¯ÊýÄÚ
1¡¢ ·Ç·¨±í´ïʽ¿ªÊ¼
b) ¿ÉÄÜ:¶ªÊ§À¨ºÅ .
2. no data found
a) ¿ÉÄÜ:setInt(1,100)ÖÐ,ûÓÐ100Õâ¸öÖµ
3. ÕÒ²»µ½·ûºÅ
a) ¿ÉÄÜ:ûµ¼Èë°ü
4. Ö¸¶¨ÁËÎÞЧURL
a) ¿ÉÄÜ:Êý¾Ý¿âÃû»òIP´íÎó,¼´Á¬½Ó³ö´í
5. Àà·¾¶Ã»ÓÐÕÒµ½
a) ¿ÉÄÜ: ClassNotFoundException: oracle.jdbc.driver.Or ......

תÌù: JavaµÄÀ¬»ø»ØÊÕ»úÖÆ

2006-01-18 13:53×÷Õߣº³ö´¦£º²©¿ÍÔ°ÔðÈα༭£º·½ÖÛ http://dev.yesky.com/178/2278678.shtml ÒýÑÔ
JavaµÄ¶ÑÊÇÒ»¸öÔËÐÐʱÊý¾ÝÇø£¬ÀàµÄʵÀý(¶ÔÏó)´ÓÖзÖÅä¿Õ¼ä¡£JavaÐéÄâ»ú(JVM)µÄ¶ÑÖд¢´æ×ÅÕýÔÚÔËÐеÄÓ¦ÓóÌÐòËù½¨Á¢µÄËùÓжÔÏó£¬ÕâЩ¶ÔÏóͨ¹ýnew¡¢newarray¡¢anewarrayºÍmultianewarrayµÈÖ¸ÁÁ¢£¬µ«ÊÇËüÃDz»ÐèÒ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ