¼¸ÖÖ³£¼ûµÄÊý¾Ý½á¹¹µÄJAVAʵÏÖ
Ê÷ÊÇÒ»¸öµÝ¹éµÄÊý¾Ý½á¹¹£¬Ò»¿ÃÊ÷ÉϵÄËùÓнڵ㶼¿ÉÒÔ±»¿´³ÉÊÇÒ»¿ÃÊ÷£¬Ö»²»¹ý³ý¸ù½ÚµãÍâÆäËû½Úµã¶¼±È×ÜÊ÷µÄ¹æģСµã¶øÒÑ¡£Ê÷µÄ½ÚµãÓÐÈýÖÖ£º¸ù½Úµã£¨Ã»Óи¸Ç׽ڵ㣩£¬Ò¶×ӽڵ㣨ûÓк¢×ӽڵ㣩£¬Ò»°ã½Úµã£¨¼ÈÓи¸Ç׽ڵ㣬ҲÓк¢×ӽڵ㣩¡£¾ßÌå¶Ô½á¹¹µÄ·ÖÎö£¬¼¸ºõËùÓÐдÊý¾Ý½á¹¹µÄÊéÖж¼ÓÐÌáµ½¡£
Õâ¿ÃÊ÷µÄʵÏÖ»¨Á˺ü¸Ììʱ¼ä£¬Åöµ½µÄ×î´óÎÊÌâÊÇJAVAµÄ·ºÐÍ£¬ÔÚ¶Ô·ºÐͲ»ÊÇ×ã¹»Á˽âµÄÊÂʵÏ£¬Ëƺõµ½´¦¶¼Åöµ½ÏÝÚ壬ÐÒ¿÷ÔÚÕâÖмäµÃµ½ÁËÖÜÊ÷Ⱥͬ־µÄ¶¦Á¦ÏàÖú£¬ËùÒÔÔÚÕâÀï±íÑïËûÀÏÈ˼ÒÒ»°Ñ£ºÖÜÊ÷ȺÊǸöºÃͬ־£¡
²»¹ÜÔõô˵£¬Ò»¿Ã¼òµ¥µÄÊ÷ÒѾʵÏÖÁË£¬ÒÔºóÒªÓõ½Ê÷µÄµØ·½¾Í·½±ã¶àÁË£¨Ä¿Ç°ÎªÖ¹ÎÒ»¹Ã»¿´µ½JDKÀïÓÐרÃŵÄÊ÷µÄʵÏÖ£©¡£ÏÂÃæÊÇÕâ¿ÃÊ÷µÄ½Ó¿ÚITree£¬ÒÔ¼°¾ßÌåʵÏÖÀàOriginalTree¡£
ITree:
package utility.structure.def;
import java.util.Collection;
import java.util.List;
/**
*
* @author odie.tang
*
* @version 1.0 10/30/09
*/
public interface ITree<E>{
E getData();
void set(E e);
E remove();
int getDepth();
int getLevel();
ITree<E> getParent();
ITree<E> getFirstChild();
ITree<E> getLastChild();
ITree<E> addChild(int childIndex,E e);
void addChildren(Collection<? extends E> children);
void addChildren(int childIndex, Collection<? extends E> children);
ITree<E> addChild(E e);
ITree<E> getChild(int childIndex);
E removeChild(int childIndex);
List<ITree<E>> getChildren();
boolean isLeaf();
boolean isRoot();
ITree<E> getRoot();
boolean remove(E e);
ITree<E> getNode(E e);
}
OriginalTree:
package utility.structure;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.ConcurrentModificationException;
import java.util.List;
import java.util.NoSuchElementException;
import utility.structure.def.ITree;
/**
* @author odie.tang
* @version 1.0 , 10/30/09
*/
public class OriginalTree<E> implements ITree<E>,Serializable {
private static final long serialVersionUID =
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
±¾ÎÄ·ÖÁ½²¿·Ö£ºFLASH±à³Ì ºÍ Java±à³Ì£¬´ËÎļǼµÄ½ö½öÊÇÎÒÔÚ̽Ë÷ÖеÄһЩÊÕ»ñ£¬ÆäÖÐÓÃÁ˺ܶà¸öÈË»¯µÄÃèÊöÓïÑÔ£¬²¢²»ÊÇÒµ½ç±ê×¼µÄÓÃÓï¡£ £º£©
̽Ë÷±Ê¼Ç£º
Ä¿Ç°¹úÄÚFlashÓ¦Óô󲿷ֻ¹ÊÇÔÚÖÆ×÷¾«ÃÀµÄ¶¯»·½Ã棬µ«¾ÝÎÒÁ˽âÔçÔÚFlash4 µÄʱ´ú£¬¹úÍâһЩÈ˾ÍÒѾ¿ªÊ¼½«flash¼¼ÊõÔËÓÃÓÚ¿ª·¢¶¯Ì¬ÍøÕ¾£¨ºÍphp¡ ......
C++ÓëJavaµÄÓï·¨Çø±ð
Ê×ÏÈ£¬Á½¸ö´óµÄ²»Í¬ÊÇÖ÷º¯ÊýºÍÔõÑù±àÒëµÄ²»Í¬£¬½ÓÏÂÀ´ÊÇÐí¶àСµÄÇø±ð¡£
main º¯Êý
C++
//×ÔÓɸ¡¶¯µÄº¯Êý
int main( int argc, char* argv[])
{
printf( "Hello, world" );
}
Java
// ÿ¸öº¯Êý¶¼±ØÐëÊÇÒ»¸öÀàµÄÒ»²¿·Ö;µ±java <class>ÔËÐÐÊÇÒ»¸öÌض¨ÀàµÄÖ÷º¯Êý»á±»µ÷ ......
/*ÏÈ°ÑÏÂÔصÄÎļþ·ÅÔÚUpdateTempÎļþ¼ÐÖУ¬´ýÈ«²¿ÏÂÔغó£¬ÔÙ°Ñ´ËÎļþ¼ÐÖеÄÎļþÒƳöÌæ»»¾ÉÎļþ*/
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
......