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

¼¸ÖÖ³£¼ûµÄÊý¾Ý½á¹¹µÄJAVAʵÏÖ

 ITree
package utility.structure.def;
/**
*
* @author odie.tang
*
* @version 1.0 10/30/09
*/
public interface ITree<E>{

E getData();

E remove();

void setData(E e);

int getDepth();

int getLevel();

ITree<E> getRoot();

ITree<E> getParent();

ITree<E> getFirstChild();

ITree<E> addFirtChild(E e);

ITree<E> getLastChild();

ITree<E> addLastChild(E e);

ITree<E> getNode(E e);

boolean isLeaf();

boolean isRoot();

boolean remove(E e);
}

IBinaryTree
package utility.structure.def;
public interface IBinaryTree<E> extends ITree<E>{

boolean hasLeftChild();

boolean isLeftChild();

IBinaryTree<E> getLeftChild();

IBinaryTree<E> addLeftChild(E e);

boolean hasRightChild();

boolean isRightChild();

IBinaryTree<E> getRightChild();

IBinaryTree<E> addRightChild(E e);
}
BinaryTree
package utility.structure;
import java.io.Serializable;
import java.util.ConcurrentModificationException;
import utility.structure.def.IBinaryTree;
import utility.structure.def.ITree;
/**
*
* @author odie.tang
*
* @since 1.0 11/01/09
*/
public class BinaryTree<E> implements IBinaryTree<E>,Serializable{

private static final long serialVersionUID = 1565285530988892541L;
private E data;
private BinaryTree<E> parent = null;
private BinaryTree<E> leftChild = null;
private BinaryTree<E> rightChild = null;
private int level;
private enum Child{left,right}

public BinaryTree(E root) {
this.data = root;
this.level = 1;
}

public BinaryTree(E root, E leftChild){
this.data = root;
this.level = 1;
new BinaryTree<E>(this,Child.left,leftChild);
}

public BinaryTree(E root, E leftChild,E rightChild){
this.data = root;
this.level = 1;
new BinaryTree<E>(this,Child.left,leftChild);
new BinaryTre


Ïà¹ØÎĵµ£º

È«ÃæÕÆÎÕjavaö¾ÙÀàÐÍ

ö¾ÙÀàÐÍÊÇJDK5.0µÄÐÂÌØÕ÷¡£SunÒý½øÁËÒ»¸öȫеĹؼü×ÖenumÀ´¶¨ÒåÒ»¸öö¾ÙÀà¡£ÏÂÃæ¾ÍÊÇÒ»¸öµäÐÍö¾ÙÀàÐ͵Ķ¨Ò壺
Java´úÂë
public enum Color{   
    RED,BLUE,BLACK,YELLOW,GREEN   
}  
public enum Color{
RED,BLUE,BLACK,YELLOW,GREEN
}
ÏÔ ......

WindowsÏÂJAVA»·¾³±äÁ¿µÄÉèÖÃÏê½â


WindowsÏÂJAVAÓõ½µÄ»·¾³±äÁ¿Ö÷ÒªÓÐ3¸ö£¬JAVA_HOME¡¢CLASSPATH¡¢PATH¡£ÏÂÃæÖð¸ö·ÖÎö¡£
JAVA_HOMEÖ¸ÏòµÄÊÇJDKµÄ°²×°Â·¾¶£¬Èçx:\JDK_1.4.2£¬ÔÚÕâ·¾¶ÏÂÄãÓ¦¸ÃÄܹ»ÕÒµ½bin¡¢libµÈĿ¼¡£ÖµµÃÒ»ÌáµÄÊÇ£¬JDKµÄ°²×°Â·¾¶¿ÉÒÔÑ¡ÔñÈÎÒâ´ÅÅÌĿ¼£¬²»¹ý½¨ÒéÄã·ÅµÄĿ¼²ã´Îdzһµã£¬Èç¹ûÄã·ÅµÄĿ¼ºÜÉ±ÈÈçx:\XXXXXX\xxxxx\XXXX\xxxx ......

JavaÖеÄÊÂÎñ´¦Àí

JavaÖеÄÊÂÎñ´¦Àí
¡¡¡¡Ò»°ãÇé¿öÏ£¬J2EEÓ¦Ó÷þÎñÆ÷Ö§³ÖJDBCÊÂÎñ¡¢JTA£¨Java Transaction API£©ÊÂÎñ¡¢ÈÝÆ÷¹ÜÀíÊÂÎñ¡£Ò»°ãÇé¿öÏ£¬×îºÃ²»ÒªÔÚ³ÌÐòÖÐͬʱʹÓÃÉÏÊöÈýÖÖÊÂÎñÀàÐÍ£¬±ÈÈçÔÚJTAÊÂÎñÖÐǶÌ×JDBCÊÂÎñ¡£µÚ¶þ·½Ã棬ÊÂÎñÒªÔÚ¾¡¿ÉÄ̵ܶÄʱ¼äÄÚÍê³É£¬²»ÒªÔÚ²»Í¬·½·¨ÖÐʵÏÖÊÂÎñµÄʹÓá£ÏÂÃæÎÒÃÇÁоÙÁ½ÖÖÊÂÎñ´¦Àí·½Ê½¡£
¡¡¡¡ ......

¼¸ÖÖ³£¼ûµÄÊý¾Ý½á¹¹µÄJAVAʵÏÖ

°ÑÊ÷ÐεĽṹ³éÏóÁËһϡ£
ITree
package utility.structure.def;
/**
*
* @author odie.tang
*
* @version 1.0 10/30/09
*/
public interface ITree<E>{

E getData();

E remove();

void setData(E e);

int getDepth();

int getLevel();

ITree<E> getRoot();
......

¡¾×ªÔØ¡¿Javaѧϰ·¾¶

Javaѧϰ·¾¶£¨Ò»£©¹¤¾ßƪ
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJDKÊÇSun¹«Ë¾·¢²¼µÄJDK£¬³ýÁËSunÖ®Í⣬»¹Óкܶ๠......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ